├── .gitattributes ├── LQ Control ├── LQControl.slx ├── noControl.slx ├── LQControlObserver.slx ├── Results │ ├── LQControl.png │ ├── noControl.png │ ├── optimalControl.png │ ├── LQControlObserver.png │ ├── noControlObserver.png │ └── LQControlReducedOrderObserver.png ├── noControlObserver.slx ├── optimalLQControl.slx ├── Simulink models │ ├── LQControl.PNG │ ├── noControl.PNG │ ├── optimalLQControl.PNG │ ├── LQControlObserver.PNG │ ├── noControlObserver.PNG │ └── LQControlReducedObserver.PNG ├── LQControlReducedOrderObserver.slx ├── optimalLQControl_script.m ├── README.md ├── LQControl_script.m ├── calculations1.nb └── calculations2.nb ├── System Analysis ├── BodePole.png ├── BodeSeries.png ├── NyquistPole.png ├── BodeFirstOrder.png ├── NyquistSeries.png ├── NyquistFirstOrder.png ├── poleAnalysisZPKSystem.png ├── poleAnalysisFirstOrderSystem.png ├── poleAnalysisSecondOrderSystem.png ├── bodeAndNyquist.m ├── poleAnalysis.m └── README.md ├── PID Control ├── PIDTuningControl.png ├── PIDTuningControl.slx ├── marginFirstOrder.png ├── marginThirdOrder.png ├── PIDTuningNoControl.slx ├── PIDTuningOpenLoop.png ├── PIDTuningOpenLoop.slx ├── marginSecondOrder.png ├── FeedforwardBackward.png ├── PIDcontroller_model.slx ├── PIDcontrollerInfluenceD.png ├── PIDcontrollerInfluenceI.png ├── PIDcontrollerInfluenceP.png ├── FeedforwardBackward_model.slx ├── controlWithMeasurementDelay.png ├── Simulink models │ ├── PIDTuningControl.PNG │ ├── PIDTuningOpenLoop.PNG │ ├── PIDTuningNoControl.PNG │ ├── PIDcontroller_model.PNG │ ├── FeedforwardBackward_model.PNG │ └── controlWithMeasurementDelay.PNG ├── controlWithMeasurementDelay_model.slx ├── FeedforwardBackward.m ├── controlWithMeasurementDelay.m ├── margin.m ├── PIDTuning.m ├── PIDcontroller.m └── README.md ├── Model Predictive Control ├── step.xlsx ├── System.slx ├── Figures │ ├── t1003.PNG │ ├── t1020.PNG │ ├── VariationM.png │ ├── VariationP.png │ ├── StepResponse.png │ ├── ControlAction.png │ └── ControlledSystem.png ├── variation_p.m ├── variation_m.m ├── script.m ├── README.md ├── optimisation.m └── discrete_DMC.m ├── Q-Learning and SARSA ├── CatMouse.PNG ├── CatMouse2.PNG ├── README.md ├── Q_Prey.m ├── Q_Predator.m └── SARSA_Prey.m ├── Fuzzy Logic ├── README.md ├── kachel.m ├── genereerParametervoorstelling.m ├── parameters.m ├── berekenLidmaatschapsgraad.m ├── afknottenLidmaatschapsfuncties.m ├── output.txt ├── vaagmodel.m ├── data.txt └── refdata.txt └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | *.m linguist-language=MATLAB 3 | -------------------------------------------------------------------------------- /LQ Control/LQControl.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/LQ Control/LQControl.slx -------------------------------------------------------------------------------- /LQ Control/noControl.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/LQ Control/noControl.slx -------------------------------------------------------------------------------- /System Analysis/BodePole.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/System Analysis/BodePole.png -------------------------------------------------------------------------------- /LQ Control/LQControlObserver.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/LQ Control/LQControlObserver.slx -------------------------------------------------------------------------------- /LQ Control/Results/LQControl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/LQ Control/Results/LQControl.png -------------------------------------------------------------------------------- /LQ Control/Results/noControl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/LQ Control/Results/noControl.png -------------------------------------------------------------------------------- /LQ Control/noControlObserver.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/LQ Control/noControlObserver.slx -------------------------------------------------------------------------------- /LQ Control/optimalLQControl.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/LQ Control/optimalLQControl.slx -------------------------------------------------------------------------------- /PID Control/PIDTuningControl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/PID Control/PIDTuningControl.png -------------------------------------------------------------------------------- /PID Control/PIDTuningControl.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/PID Control/PIDTuningControl.slx -------------------------------------------------------------------------------- /PID Control/marginFirstOrder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/PID Control/marginFirstOrder.png -------------------------------------------------------------------------------- /PID Control/marginThirdOrder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/PID Control/marginThirdOrder.png -------------------------------------------------------------------------------- /System Analysis/BodeSeries.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/System Analysis/BodeSeries.png -------------------------------------------------------------------------------- /System Analysis/NyquistPole.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/System Analysis/NyquistPole.png -------------------------------------------------------------------------------- /Model Predictive Control/step.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/Model Predictive Control/step.xlsx -------------------------------------------------------------------------------- /PID Control/PIDTuningNoControl.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/PID Control/PIDTuningNoControl.slx -------------------------------------------------------------------------------- /PID Control/PIDTuningOpenLoop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/PID Control/PIDTuningOpenLoop.png -------------------------------------------------------------------------------- /PID Control/PIDTuningOpenLoop.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/PID Control/PIDTuningOpenLoop.slx -------------------------------------------------------------------------------- /PID Control/marginSecondOrder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/PID Control/marginSecondOrder.png -------------------------------------------------------------------------------- /Q-Learning and SARSA/CatMouse.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/Q-Learning and SARSA/CatMouse.PNG -------------------------------------------------------------------------------- /Q-Learning and SARSA/CatMouse2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/Q-Learning and SARSA/CatMouse2.PNG -------------------------------------------------------------------------------- /System Analysis/BodeFirstOrder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/System Analysis/BodeFirstOrder.png -------------------------------------------------------------------------------- /System Analysis/NyquistSeries.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/System Analysis/NyquistSeries.png -------------------------------------------------------------------------------- /LQ Control/Results/optimalControl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/LQ Control/Results/optimalControl.png -------------------------------------------------------------------------------- /Model Predictive Control/System.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/Model Predictive Control/System.slx -------------------------------------------------------------------------------- /PID Control/FeedforwardBackward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/PID Control/FeedforwardBackward.png -------------------------------------------------------------------------------- /PID Control/PIDcontroller_model.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/PID Control/PIDcontroller_model.slx -------------------------------------------------------------------------------- /System Analysis/NyquistFirstOrder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/System Analysis/NyquistFirstOrder.png -------------------------------------------------------------------------------- /PID Control/PIDcontrollerInfluenceD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/PID Control/PIDcontrollerInfluenceD.png -------------------------------------------------------------------------------- /PID Control/PIDcontrollerInfluenceI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/PID Control/PIDcontrollerInfluenceI.png -------------------------------------------------------------------------------- /PID Control/PIDcontrollerInfluenceP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/PID Control/PIDcontrollerInfluenceP.png -------------------------------------------------------------------------------- /LQ Control/Results/LQControlObserver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/LQ Control/Results/LQControlObserver.png -------------------------------------------------------------------------------- /LQ Control/Results/noControlObserver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/LQ Control/Results/noControlObserver.png -------------------------------------------------------------------------------- /LQ Control/Simulink models/LQControl.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/LQ Control/Simulink models/LQControl.PNG -------------------------------------------------------------------------------- /LQ Control/Simulink models/noControl.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/LQ Control/Simulink models/noControl.PNG -------------------------------------------------------------------------------- /Model Predictive Control/Figures/t1003.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/Model Predictive Control/Figures/t1003.PNG -------------------------------------------------------------------------------- /Model Predictive Control/Figures/t1020.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/Model Predictive Control/Figures/t1020.PNG -------------------------------------------------------------------------------- /PID Control/FeedforwardBackward_model.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/PID Control/FeedforwardBackward_model.slx -------------------------------------------------------------------------------- /System Analysis/poleAnalysisZPKSystem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/System Analysis/poleAnalysisZPKSystem.png -------------------------------------------------------------------------------- /LQ Control/LQControlReducedOrderObserver.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/LQ Control/LQControlReducedOrderObserver.slx -------------------------------------------------------------------------------- /PID Control/controlWithMeasurementDelay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/PID Control/controlWithMeasurementDelay.png -------------------------------------------------------------------------------- /LQ Control/Simulink models/optimalLQControl.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/LQ Control/Simulink models/optimalLQControl.PNG -------------------------------------------------------------------------------- /Model Predictive Control/Figures/VariationM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/Model Predictive Control/Figures/VariationM.png -------------------------------------------------------------------------------- /Model Predictive Control/Figures/VariationP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/Model Predictive Control/Figures/VariationP.png -------------------------------------------------------------------------------- /LQ Control/Simulink models/LQControlObserver.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/LQ Control/Simulink models/LQControlObserver.PNG -------------------------------------------------------------------------------- /LQ Control/Simulink models/noControlObserver.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/LQ Control/Simulink models/noControlObserver.PNG -------------------------------------------------------------------------------- /Model Predictive Control/Figures/StepResponse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/Model Predictive Control/Figures/StepResponse.png -------------------------------------------------------------------------------- /PID Control/Simulink models/PIDTuningControl.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/PID Control/Simulink models/PIDTuningControl.PNG -------------------------------------------------------------------------------- /PID Control/Simulink models/PIDTuningOpenLoop.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/PID Control/Simulink models/PIDTuningOpenLoop.PNG -------------------------------------------------------------------------------- /PID Control/controlWithMeasurementDelay_model.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/PID Control/controlWithMeasurementDelay_model.slx -------------------------------------------------------------------------------- /System Analysis/poleAnalysisFirstOrderSystem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/System Analysis/poleAnalysisFirstOrderSystem.png -------------------------------------------------------------------------------- /System Analysis/poleAnalysisSecondOrderSystem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/System Analysis/poleAnalysisSecondOrderSystem.png -------------------------------------------------------------------------------- /LQ Control/Results/LQControlReducedOrderObserver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/LQ Control/Results/LQControlReducedOrderObserver.png -------------------------------------------------------------------------------- /Model Predictive Control/Figures/ControlAction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/Model Predictive Control/Figures/ControlAction.png -------------------------------------------------------------------------------- /PID Control/Simulink models/PIDTuningNoControl.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/PID Control/Simulink models/PIDTuningNoControl.PNG -------------------------------------------------------------------------------- /PID Control/Simulink models/PIDcontroller_model.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/PID Control/Simulink models/PIDcontroller_model.PNG -------------------------------------------------------------------------------- /Model Predictive Control/Figures/ControlledSystem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/Model Predictive Control/Figures/ControlledSystem.png -------------------------------------------------------------------------------- /LQ Control/Simulink models/LQControlReducedObserver.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/LQ Control/Simulink models/LQControlReducedObserver.PNG -------------------------------------------------------------------------------- /PID Control/Simulink models/FeedforwardBackward_model.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/PID Control/Simulink models/FeedforwardBackward_model.PNG -------------------------------------------------------------------------------- /PID Control/Simulink models/controlWithMeasurementDelay.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-d-self-driving/Control-and-AI-Algorithms/HEAD/PID Control/Simulink models/controlWithMeasurementDelay.PNG -------------------------------------------------------------------------------- /Fuzzy Logic/README.md: -------------------------------------------------------------------------------- 1 | Implementation of Fuzzy Logic in MATLAB. In Fuzzy Logic, the truth values of variables may be any real number between 0 and 1. 2 | Therefore, it can handle 'partial truth', where the truth value may range between completely true and completely false. -------------------------------------------------------------------------------- /Fuzzy Logic/kachel.m: -------------------------------------------------------------------------------- 1 | input = dlmread('refdata.txt'); 2 | x = input(:,1:2); 3 | y = input(:,3); 4 | 5 | ParVM.x1par = [0 30 60 90 100]; 6 | ParVM.x2par = [0 20 45 70 90 100]; 7 | ParVM.ypar = [0 15 30 50 60 80 100]; 8 | ParVM.R = [5 4 3 2; 9 | 4 3 2 1; 10 | 3 3 2 1]; 11 | 12 | y_model = vaagmodel(x,ParVM); 13 | 14 | RMSE = sum((y-y_model).^2)/length(y_model) -------------------------------------------------------------------------------- /Q-Learning and SARSA/README.md: -------------------------------------------------------------------------------- 1 | # Q-learners and SARSA 2 | 3 | Q-Learning and SARSA algorithms are used to let an imaginary cat (red) through a maze. Besides not running into the walls, the cat tries to locate the mouse (blue). 4 | 5 | 6 | -------------------------------------------------------------------------------- /PID Control/FeedforwardBackward.m: -------------------------------------------------------------------------------- 1 | % Transfer function system 2 | num_system = [3.5]; 3 | denom_system = [7 1]; 4 | 5 | % Transfer function Feedforward Control 6 | num_ff = [1]; 7 | denom_ff = [1 1]; 8 | 9 | % Transfer function measurement 10 | num_measurement = [-6 -1]; 11 | denom_measurement = [3 3]; 12 | 13 | % Parameters Feedback Control 14 | K_c = 1; 15 | 16 | % Simulation parameter 17 | duur = 60; 18 | 19 | % Run simulation 20 | sim('FeedforwardBackward_model') 21 | 22 | t = simout(:,1); 23 | y = simout(:,2); 24 | z = simout(:,3); 25 | 26 | plot(t,y,t,z) 27 | title('Feedforward-feedbackward Control') 28 | xlabel('Time') 29 | ylabel('Output') 30 | legend('System output', 'Perturbation') -------------------------------------------------------------------------------- /System Analysis/bodeAndNyquist.m: -------------------------------------------------------------------------------- 1 | %% First-order transfer function system 2 | sys = tf([10],[1 6 16]); 3 | 4 | % Nyquist plot 5 | figure() 6 | nyquist(sys) 7 | 8 | % Bode Plot 9 | figure() 10 | bode(sys) 11 | 12 | %% Series transfer function system 13 | sys1 = tf(1,[1 0 0]); 14 | sys2 = tf(16,[1 4 16]); 15 | sys3 = zpk(-1,[],10); 16 | 17 | % Series of systems 1-3 18 | sys12 = series(sys1, sys2); 19 | sys123 = series(sys12,sys3); 20 | 21 | % Nyquist and Bode plot 22 | figure() 23 | nyquist(sys123) 24 | figure() 25 | bode(sys123) 26 | 27 | 28 | %% Define system with pole coordinates 29 | sys4 = zpk([],[-1 -2 -3],1) 30 | 31 | % Nyquist and Bode plot 32 | figure() 33 | nyquist(sys4) 34 | figure() 35 | bode(sys4) 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /PID Control/controlWithMeasurementDelay.m: -------------------------------------------------------------------------------- 1 | % Parameters system 2 | rho = 1000; 3 | g = 10; 4 | A = 20; 5 | R = 15; 6 | tau = A*R; 7 | K_p = 10^(-5)*rho*g*R; 8 | 9 | % Parameters step 10 | t_step = 30*60; 11 | p_voor = 2; 12 | p_na = 3; 13 | 14 | % P-control parameter 15 | Kc = 2; 16 | 17 | % Simulation parameters 18 | simulatietijd = 3500; 19 | 20 | % Measurement delay 21 | td = 120; 22 | 23 | % Run simulation and save output 24 | sim('controlWithMeasurementDelay_model') 25 | t = simout(:,1); 26 | u = simout(:,2); 27 | y = simout(:,3); 28 | y_m = simout(:,4); 29 | 30 | % Plot output 31 | plot(t,u,t,y,t,y_m) 32 | title('Control with Measurement Delay, Step at t = 1800') 33 | xlabel('Time') 34 | ylabel('Output') 35 | legend('Controlled Input', 'Output','Measurement') -------------------------------------------------------------------------------- /Fuzzy Logic/genereerParametervoorstelling.m: -------------------------------------------------------------------------------- 1 | function par = genereerParametervoorstelling(x) 2 | % xn=genereerParametervoorstelling(x) 3 | % Input: parametervector x met dimensies 1x(n+2) (n: aantal 4 | % lidmaatschapsfuncties) 5 | % Output: parametermatrix par met dimensies nx4 6 | % Met deze functie wordt de korte vector met de n+2 parameters van de trapezoidale/triangulaire 7 | % lidmaatschapsfuncties van een variabele, omgezet in een nx4 matrix. Hierbij 8 | % is n het aantal lidmaatschapsfuncties van de variabele 9 | 10 | a=2; 11 | par(1,1)=x(1)-a; 12 | par(1,2:4)=x(1:3); 13 | par(length(x)-2,1:3)=x(end-2:end); 14 | par(length(x)-2,4)=x(end)+a; 15 | for i=2:length(x)-3 16 | par(i,1:2)=x(i:i+1); 17 | par(i,3:4)=x(i+1:i+2); 18 | end, 19 | 20 | 21 | -------------------------------------------------------------------------------- /LQ Control/optimalLQControl_script.m: -------------------------------------------------------------------------------- 1 | %% Optimal LQ Control 2 | 3 | % Initialization 4 | clc 5 | clear all 6 | 7 | % Parameters 8 | beta1 = 10; 9 | beta2 = 100; 10 | c = 19; 11 | n0 = 10; 12 | U0 = 0; 13 | b = 0; 14 | tijd = 10; 15 | 16 | % State-space system 17 | A = [-(beta1+c) 3*beta2; 18 | beta1 -beta2]; 19 | B = [-1;0]; 20 | C = [1 0; 21 | 0 1]; 22 | D = [0;0]; 23 | 24 | % Optimal control weights 25 | Q = [10 0; 26 | 0 10]; 27 | R = [1]; 28 | N = [0;0]; 29 | 30 | % Setpoint 31 | X_sp = [10^4 10^3]; 32 | 33 | % Optimal control 34 | [k,M,E] = lqr(A,B,Q,R,N); 35 | K1 = -k; 36 | K2 = inv(R)*B'*(M+inv(A'-M*B*inv(R)*B')*M); 37 | 38 | % Simulation 39 | sim('optimalLQControl') 40 | t = simout(:,1); 41 | n = simout(:,2); 42 | U = simout(:,3); 43 | 44 | % Plot results 45 | plot(t,n,t,U) 46 | legend('n','U') -------------------------------------------------------------------------------- /Fuzzy Logic/parameters.m: -------------------------------------------------------------------------------- 1 | clear all 2 | % parameters van de lidmaatschapsfuncties van de eerste ingangsvariabele 3 | ParVM.x1par = [0 20 40 60 80 100]; 4 | % parameters van de lidmaatschapsfuncties van de tweede ingangsvariabele 5 | ParVM.x2par = [0 15 40 65 90 100]; 6 | % parameters van de lidmaatschapsfuncties van de uitgangsvariabele 7 | ParVM.ypar = [0 15 30 50 60 80 100]; 8 | % regelbank 9 | % indices van de rijen komen overeen met het nummer van de lidmaatschapsfunctie van de ingangsvariabele x1 10 | % indices van de kolommen komen overeen met het nummer van de lidmaatschapsfunctie van de ingangsvariabele x2 11 | % waarden in de matrix R komen overeen met het nummer van de lidmaatschapsfunctie van de uitgangsvariabele y 12 | ParVM.R = [5 5 4 3; 5 4 3 2; 4 3 3 2; 3 2 1 1]; 13 | 14 | x = dlmread('data_vraag2.txt'); 15 | y = vaagmodel(x, ParVM); 16 | save('uitkomst_vraag2.txt', 'y', '-ASCII') -------------------------------------------------------------------------------- /Fuzzy Logic/berekenLidmaatschapsgraad.m: -------------------------------------------------------------------------------- 1 | function y = berekenLidmaatschapsgraad(dat,par) 2 | % y=berekenLidmaatschapsgraad(dat,par) 3 | % berekenen van de lidmaatschapsgraden 4 | % input: dat: kolomvector, bevat waarden voor die variabele 5 | % waarvoor de lidmaatschapsgraad berekend wordt 6 | % par: n * 4 matrix, bevat de parameters van de N lidmaatschapsfuncties 7 | % 8 | % output: y: matrix, bevat de lidmaatschapsgraden voor elk data punt 9 | % dimensies: n * m 10 | 11 | 12 | n = size(dat,1); 13 | Z=zeros(n,1); 14 | E=ones(n,1); 15 | for i=1:size(par,1) 16 | parmat = E*par(i,:); 17 | vector1(:,1) = (dat - parmat(:,1))./(parmat(:,2)-parmat(:,1)); 18 | vector1(:,2) = E; 19 | vector1(:,3) = (dat - parmat(:,4))./(parmat(:,3)-parmat(:,4)); 20 | vector2 = min(vector1,[],2); 21 | y(:,i) = max(vector2,Z); 22 | end 23 | 24 | -------------------------------------------------------------------------------- /PID Control/margin.m: -------------------------------------------------------------------------------- 1 | %% Gain and phase margin first-order transfer function system 2 | 3 | % Initialization system 4 | Kp = 10^-5*1000*10*15*2; 5 | tau = 20*15; 6 | sys= tf(Kp,[tau 1]) 7 | 8 | % Bode plot with gain and phase margin 9 | figure() 10 | margin(sys) 11 | 12 | 13 | %% Gain and phase margin second-order zpk-system 14 | 15 | % Initialization system 16 | K2 = 3; 17 | tau1 = 2; 18 | tau2 = 6; 19 | sys = zpk([],[-1/tau1 -1/tau2],K2/tau1/tau2) 20 | 21 | % Bode plot with gain and phase margin 22 | figure() 23 | margin(sys) 24 | 25 | 26 | %% Gain and phase margin third-order tf-system 27 | 28 | % Initialization system 29 | K2 = 3; 30 | tau1 = 2; 31 | tau2 = 6; 32 | taum = 0.2; 33 | Km = 1; 34 | sys = zpk([],[-1/tau1 -1/tau2 -1/taum],K2*Km/tau1/tau2/taum) 35 | 36 | % Bode plot with gain and phase margin 37 | figure() 38 | margin(sys) 39 | 40 | % Root analysis 41 | figure() 42 | rlocus(sys) 43 | [K poles]= rlocfind(sys) 44 | -------------------------------------------------------------------------------- /System Analysis/poleAnalysis.m: -------------------------------------------------------------------------------- 1 | %% Transfer-function model first-order system 2 | 3 | % Parameters transfer function 4 | tau = 300; 5 | K = 1.5; 6 | 7 | % Initialize sytem 8 | vat = tf([K], [tau,1]) 9 | 10 | % Plot root locations 11 | figure() 12 | rlocus(vat) 13 | 14 | % Calculate root location gains 15 | [K,poles] = rlocfind(vat) 16 | 17 | %% Transfer-function model second-order system 18 | 19 | % Parameters transfer-function 20 | K = 1; 21 | zeta = 0.5; 22 | omega = 1; 23 | 24 | % Initialize system 25 | figure() 26 | systeem = tf([K*omega^2], [1, 2*zeta*omega, omega^2]) 27 | 28 | % Plot root locations 29 | rlocus(systeem) 30 | 31 | % Calculate root locations 32 | [K,poles] = rlocfind(systeem) 33 | 34 | 35 | %% ZPK-model 36 | % Parameters zpk-model 37 | z = [-1.58 -0.42]; 38 | p = [0 -1/6 -1/2 -1/0.2 -1/3]; 39 | k = [1.5*0.05/6/2/0.02]; 40 | 41 | % Initialize system 42 | systeem = zpk(z, p, k) 43 | 44 | % Plot rootlocus 45 | figure() 46 | rlocus(systeem) 47 | 48 | % Calculate root location gains 49 | [K,poles] = rlocfind(systeem) -------------------------------------------------------------------------------- /Fuzzy Logic/afknottenLidmaatschapsfuncties.m: -------------------------------------------------------------------------------- 1 | function y = afknottenLidmaatschapsfuncties(dat,par,activatiegraad) 2 | % y=afknottenLidmaatschapsfuncties(dat,par,activatiegraad) 3 | % berekent voor een reeks van waarden van een variablele de activiteit van elke lidmaatschapgraad 4 | % deze lidmaatschapsgraad wordt afgeknot volgens activatiegraad, meegegeven voor elk data punt 5 | % input: dat: kolomvector, bevat waarden voor die variabele 6 | % waarvoor de lidmaatschapsgraad afgeknot wordt 7 | % par: n * 4 matrix, bevat de parameters van de N lidmaatschapsfuncties 8 | % activatiegraad: 1 * n vector, de hoogte waarop de consequent lidmaatschapsfuncties afgeknot worden, voor elke lidmaatschapfunctie 9 | 10 | % output: y: matrix, bevat de afgeknotte lidmaatschapsgraden 11 | % dimensie: m * n 12 | 13 | 14 | 15 | n = size(dat,1); 16 | Z=zeros(n,1); 17 | E=ones(n,1); 18 | for i=1:size(par,1) 19 | parmat = E*par(i,:); 20 | vector1(:,1) = (dat - parmat(:,1))./(parmat(:,2)-parmat(:,1)); 21 | vector1(:,2) = E; 22 | vector1(:,3) = (dat - parmat(:,4))./(parmat(:,3)-parmat(:,4)); 23 | vector2 = min(vector1,[],2); 24 | y(:,i) = min(max(vector2,Z), activatiegraad(1,i)); 25 | end 26 | 27 | -------------------------------------------------------------------------------- /Model Predictive Control/variation_p.m: -------------------------------------------------------------------------------- 1 | clear all 2 | close all 3 | clc 4 | 5 | % Plot step response system 6 | data = xlsread('step'); 7 | t = data(:,1); 8 | h = data(:,2); 9 | figure(1) 10 | plot(t,h) 11 | 12 | % Characterise system 13 | step = find(t == 63.28125); 14 | h_step = h(step); 15 | t_step = t(step); 16 | h_end = h(end); 17 | h_av = (h_end+h_step)/2; 18 | t_av = t(506); 19 | tau = (t_av-t_step)/log(2); 20 | Ts = round(1/7.5*tau); 21 | 22 | % Parameters 23 | staptijd=1000; 24 | hvoor=3; 25 | hna=8; 26 | h0 = 0; 27 | u0=0; 28 | simulatietijd=3000; 29 | stijl =['m', 'b', 'g', 'k']; 30 | K=0.3; 31 | m = 5; 32 | 33 | % Run for different p 34 | p_help = [5 10 50 100]; 35 | for j= 1:length(p_help) 36 | p=p_help(j) 37 | for i = 1:p 38 | C(i) = (h(step+i*Ts)-h(1))/2; 39 | R = zeros(1,m); 40 | beta = toeplitz(C,R); 41 | end 42 | 43 | sim('TorricelliDMC') 44 | tijd=simout(:,1); 45 | hoogte=simout(:,2); 46 | hoogtewens=simout(:,3); 47 | ingang=simout(:,4); 48 | hold on 49 | figure(2) 50 | plot(tijd,hoogte, stijl(j)) 51 | 52 | end 53 | 54 | % Plot results 55 | plot(tijd,hoogtewens,'r--') 56 | axis([0 simulatietijd 0 12]) 57 | xlabel('Time') 58 | ylabel('Height') 59 | legend('p=5','p=10','p=50','p=100','Setpoint') 60 | title('Variation of p-parameter (m = 5)') 61 | hold off 62 | 63 | 64 | -------------------------------------------------------------------------------- /Model Predictive Control/variation_m.m: -------------------------------------------------------------------------------- 1 | clear all 2 | close all 3 | clc 4 | 5 | % Plot step response system 6 | data = xlsread('step.xlsx'); 7 | t = data(:,1); 8 | h = data(:,2); 9 | figure(1) 10 | plot(t,h) 11 | 12 | % Characterise system 13 | step = find(t == 63.28125); %plaats in excel waarbij stap plaatsvindt 14 | h_step = h(step); 15 | t_step = t(step); 16 | h_end = h(end); 17 | h_av = (h_end+h_step)/2; 18 | t_av = t(506); 19 | tau = (t_av-t_step)/log(2); 20 | Ts = round(1/7.5*tau); 21 | 22 | % Parameters 23 | staptijd=1000; 24 | hvoor=3; 25 | hna=8; 26 | h0 = 0; 27 | u0=0; 28 | simulatietijd=3000; 29 | stijl =['m', 'b', 'y','g', 'k']; 30 | K=0.3; 31 | p = 9; 32 | 33 | % Run for different m and plot 34 | m_help= [1 5 10 30 70]; 35 | for j= 1:length(m_help) 36 | m=m_help(j) 37 | for i = 1:p 38 | C(i) = (h(step+i*Ts)-h(1))/2; 39 | R = zeros(1,m); 40 | beta = toeplitz(C,R); 41 | end 42 | 43 | sim('System') 44 | tijd=simout(:,1); 45 | hoogte=simout(:,2); 46 | hoogtewens=simout(:,3); 47 | ingang=simout(:,4); 48 | hold on 49 | figure(2) 50 | plot(tijd,hoogte, stijl(j)) 51 | 52 | end 53 | 54 | plot(tijd,hoogtewens,'r--') 55 | axis([0 simulatietijd 0 12]) 56 | xlabel('Time') 57 | ylabel('Height') 58 | legend('m=1','m=5','m=10','m=30','m=70','Setpoint') 59 | title('Variation of m-parameter (p = 9)') 60 | hold off -------------------------------------------------------------------------------- /Model Predictive Control/script.m: -------------------------------------------------------------------------------- 1 | clear all 2 | close all 3 | clc 4 | 5 | % Step-response system 6 | data = xlsread('step'); 7 | t = data(:,1); 8 | h = data(:,2); 9 | figure(1) 10 | plot(t,h) 11 | xlabel('Time') 12 | ylabel('Heigth') 13 | title('Step response system') 14 | 15 | % Determine parameters of the model 16 | step = find(t == 63.28125); 17 | h_step = h(step); 18 | t_step = t(step); 19 | h_end = h(end); 20 | h_av = (h_end+h_step)/2; 21 | t_av = t(506); % plaats in excel op h_av 22 | tau = (t_av-t_step)/log(2); 23 | Ts = round(1/7.5*tau) 24 | 25 | % Parameters 26 | p = 9; 27 | m = 2; 28 | for i = 1:p 29 | C(i) = (h(step+i*Ts)-h(1))/2; 30 | end 31 | R = zeros(1,m); 32 | beta = toeplitz(C,R); 33 | staptijd=1000; 34 | hvoor=3; 35 | hna=8; 36 | h0 = 0; 37 | u0=0; 38 | K =0.3; 39 | simulatietijd=3000; 40 | 41 | % Run model 42 | sim('System') 43 | tijd=simout(:,1); 44 | hoogte=simout(:,2); 45 | hoogtewens=simout(:,3); 46 | ingang=simout(:,4); 47 | 48 | % Plot controlled system 49 | figure() 50 | plot(tijd,hoogte,'g',tijd,hoogtewens,'r--') 51 | axis([0 simulatietijd 0 12]) 52 | legend('Height','Setpoint') 53 | xlabel('Time') 54 | ylabel('Height') 55 | title('Step response optimal PMP control') 56 | 57 | % Plot control action 58 | figure() 59 | plot(tijd,ingang) 60 | legend('Control action') 61 | xlabel('Time') 62 | ylabel('Control action') 63 | title('Control action optimal PMP control') -------------------------------------------------------------------------------- /System Analysis/README.md: -------------------------------------------------------------------------------- 1 | # System Analysis 2 | 3 | Several systems are investigated with Bode and Nyquist plots. 4 | 5 | A first order system. 6 | 7 | 8 | 9 | A second order system. 10 | 11 | 12 | 13 | A third order system. 14 | 15 | 16 | 17 | Root locus analysis is performed on these three systems. 18 | 19 | 20 | -------------------------------------------------------------------------------- /Model Predictive Control/README.md: -------------------------------------------------------------------------------- 1 | # Model Predictive Control 2 | 3 | Implementation of MPC on a basic system with the following uncontrolled step response. 4 | 5 | 6 | 7 | After optimization of the parameters, the model predictive control algorithm will accurately responds on a change in the set point. Left the response, right the taken control action. 8 | 9 | 10 | 11 | The calculations done by the MPC around the change in stepoint are visualised below: 12 | 13 | 14 | 15 | The impact of the parameters m and p is visualised: 16 | 17 | 18 | -------------------------------------------------------------------------------- /PID Control/PIDTuning.m: -------------------------------------------------------------------------------- 1 | % Parameters system 2 | K1 = 1; 3 | K2 = 3; 4 | Km = 1; 5 | tau1 = 2; 6 | tau2 = 6; 7 | taum = 0.2; 8 | 9 | % Parameters simulation 10 | duur = 60; 11 | 12 | % Run open loop system 13 | sim('PIDTuningOpenLoop') 14 | 15 | t = simout(:,1); 16 | u = simout(:,2); 17 | ym = simout(:,3); 18 | 19 | plot(t,u,t,ym) 20 | title('PID Tuning - Open loop') 21 | xlabel('Time') 22 | ylabel('Output') 23 | legend('Setpoint', 'System output') 24 | 25 | % Fit transfer function 26 | data = iddata(ym,u,1); 27 | td = 1.5; 28 | sys = tfest(data,1,0,td); 29 | K = sys.num/sys.den(2); 30 | tau = 1/sys.den(2); 31 | 32 | sim('PIDTuningNoControl') 33 | t2 = simout(:,1); 34 | u2 = simout(:,2); 35 | ym2 = simout(:,3); 36 | 37 | figure() 38 | plot(t,u,t,ym) 39 | 40 | % Calculate optimal parameters 41 | Kc1 = 1/K*tau/td*(1+td/3/tau); 42 | Kc2 = 1/K*tau/td*(0.9+td/12/tau); 43 | Kc3 = 1/K*tau/td*(4/3+td/4/tau); 44 | taui2 = td*(30+3*td/tau)/(9+20*td/tau); 45 | taui3 = td*(32+6*td/tau)/(13+8*td/tau); 46 | taud3 = td*4/(11+2*td/tau); 47 | Kc_help = [Kc1; Kc2 ;Kc3]; 48 | taui_help = [taui2; taui2 ;taui3] ; 49 | taud_help = [0; 0; taud3]; 50 | 51 | hold on 52 | for i = 1:3 53 | Kc = Kc_help(i); 54 | taui = taui_help(i); 55 | taud = taud_help(i); 56 | sim('PIDTuningControl') 57 | plot(simout(:,1), simout(:,3)) 58 | end 59 | title('PID Tuning - Control') 60 | xlabel('Time') 61 | ylabel('Output') 62 | legend('Setpoint', 'No Control', 'Optimal P control', 'Optimal PI control', 'Optimal PID control') -------------------------------------------------------------------------------- /Model Predictive Control/optimisation.m: -------------------------------------------------------------------------------- 1 | clear all 2 | close all 3 | clc 4 | 5 | % Read data 6 | data = xlsread('step.xlsx'); 7 | t = data(:,1); 8 | h = data(:,2); 9 | 10 | % Characterise system 11 | step = find(t == 63.28125); 12 | h_step = h(step); 13 | t_step = t(step); 14 | h_end = h(end); 15 | h_av = (h_end+h_step)/2; 16 | t_av = t(506); 17 | tau = (t_av-t_step)/log(2); 18 | Ts = round(1/7.5*tau); 19 | 20 | % model parameters 21 | staptijd=1000; 22 | hvoor=3; 23 | hna=8; 24 | h0 = 0; 25 | u0=0; 26 | simulatietijd=5000; 27 | 28 | % p, m and K optimalisation range 29 | p_help = 5:1:15; 30 | m_help = 2:1:14; 31 | K_help = 0.5:0.1:0.8; 32 | SSE_good = 10^100; 33 | 34 | % Brute force search 35 | for k = 1:length(p_help) 36 | p = p_help(k); 37 | for l = 1:length(m_help) 38 | m = m_help(l); 39 | for j = 1:length(K_help) 40 | K = K_help(j); 41 | 42 | for i = 1:p 43 | C(i) = (h(step+i*Ts)-h(1))/2; 44 | end 45 | R = zeros(1,m); 46 | beta = toeplitz(C,R); 47 | 48 | if p>m 49 | sim('System') 50 | t = simout(:,1); 51 | hoogte=simout(:,2); 52 | hoogtewens=simout(:,3); 53 | ingang=simout(:,4); 54 | 55 | if max(ingang) < 15 56 | sse = sum((hoogte-hoogtewens).^2); 57 | 58 | if sse < SSE_good 59 | SSE_good = sse; 60 | p_good = p; 61 | m_good = m; 62 | K_good = K; 63 | end 64 | end 65 | end 66 | end 67 | end 68 | end -------------------------------------------------------------------------------- /Q-Learning and SARSA/Q_Prey.m: -------------------------------------------------------------------------------- 1 | (* ::Package:: *) 2 | 3 | (* ::Text:: *) 4 | (*Instellen van de parameters*) 5 | 6 | 7 | alpha=0.5; 8 | gamma=0.9; 9 | epsilon=0.1; 10 | kost=-0.005; 11 | kaas=8; 12 | 13 | 14 | (* ::Text:: *) 15 | (*Opbouwen van het doolhof waarin de kat de muist moet zoeken*) 16 | 17 | 18 | m = 6; 19 | n = 8; 20 | grid = ConstantArray[0,m*n]; 21 | muur = {10,12,14,18,20,22,26,36,37,38,39}; 22 | 23 | 24 | (* ::Text:: *) 25 | (*Enkele nuttige functies*) 26 | 27 | 28 | Muurtest[x_]:=Dimensions@Select[muur,#== x&]== {1} 29 | Selecteerburen[l_] := Select[Table[k,{k,1,m*n}],((#==l-1&& Mod[l-1,n] != 0)||(#== l+1&& Mod[l,n] != 0)||#== l-n||#== l+n )&] 30 | Selecteernietmuren[x_] := Select[x,!Muurtest[#]&] 31 | FastRF[a_List, b_List] := Module[{c, o, x}, c = Join[b, a]; o = Ordering[c]; x = 1 - 2 UnitStep[-1 - Length[b] + o]; x = FoldList[Max[#, 0] + #2 &, x]; x[[o]] = x; Pick[c, x, -1]] 32 | 33 | 34 | (* ::Text:: *) 35 | (*Opstellen van de Q matrix*) 36 | 37 | 38 | Q=Partition[ConstantArray[0,(m*n)^2],(m*n)]; 39 | Q[[All,muur]]=-1; 40 | 41 | 42 | (* ::Text:: *) 43 | (*Trainen van de muis. De kat wordt mee gegeven via het shel script, de kat wordt random in het rooster gezet.*) 44 | 45 | 46 | alleBuren=Map[Selecteernietmuren[Selecteerburen[#]]&,Table[k,{k,1,m*n}]]; muizen=FastRF[Table[k,{k,1,m*n}],Join[{kat,kaas},muur]]; 47 | Monitor[Do[s=RandomSample[muizen,1];If[t<5000,e=RandomReal[1],e=epsilon];s=s[[1]]; 48 | While[s!=kaas && s!= kat, 49 | buren=alleBuren[[s]]; 50 | If[RandomReal[1] 8 | 9 | With LQ control, the controllable variables (k and v) will go towards the desired value. Uncontrollable variables (s) cannot be controlled. 10 | 11 | 12 | 13 | Sometimes, some variables cannot be measered directly. An observer will estimate these values. 14 | 15 | 16 | 17 | The observer can be combined with LQ control. 18 | 19 | 20 | 21 | Finally, a reduced order observer can be used as well. 22 | 23 | 24 | 25 | To achieve optimal control, the controlmatrix can be optimized (on an other system). 26 | 27 | 28 | -------------------------------------------------------------------------------- /Fuzzy Logic/vaagmodel.m: -------------------------------------------------------------------------------- 1 | function y = vaagmodel(x,ParVM) 2 | % Implementatie van een Mamdani-Assilian model 3 | % Input: x ingangsdata 4 | % ParVM structure, bevat de parameters van het Mamdani-Assilian model 5 | % ParVM.x1par vector, parameters van de lidmaatschapsfuncties van de eerste ingangsvariable x1 6 | % ParVM.x2par vector, parameters van de lidmaatschapsfuncties van de tweede ingangsvariable x2 7 | % ParVM.ypar vector, parameters van de lidmaatschapsfuncties van de uitgangsvariable y 8 | % ParVM.R matrix die de regelbank voorstelt 9 | % Output: y vector, bevat de waarden van de outputvariabele 10 | 11 | % Preallocatie van de activatiematrix 12 | activatiematrix = zeros(size(ParVM.R,1),size(ParVM.R,2)); 13 | % Zet de vectoren x1par, x2par en ypar om in een werkbare vorm 14 | parameterx1=genereerParametervoorstelling(ParVM.x1par); 15 | parameterx2=genereerParametervoorstelling(ParVM.x2par); 16 | parametery=genereerParametervoorstelling(ParVM.ypar); 17 | discrety= linspace(ParVM.ypar(1),ParVM.ypar(end),101); 18 | 19 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 20 | % Hier komt de implementatie van het Mamdani-Assilian model % 21 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 22 | 23 | %bepaal de lidmaatschapsgraden van de ingangsdata 24 | lid_x1 = berekenLidmaatschapsgraad(x(:,1), parameterx1); 25 | lid_x2 = berekenLidmaatschapsgraad(x(:,2), parameterx2); 26 | 27 | % voor elk datapunt 28 | for i = 1:size(x,1) 29 | % Bepaal de activatiegraad voor elke individuele regel 30 | for j=1:size(ParVM.R,1) 31 | for k = 1:size(ParVM.R,2) 32 | activatiematrix(j,k) = min(lid_x1(i,j), lid_x2(i,k)); 33 | end 34 | end 35 | 36 | % Bepaal de maximale activatiegraad voor elke lidmaatschapsfunctie van 37 | % de outputvariabele 38 | for l = 1:length(ParVM.ypar)-2 39 | activatiegraad(l) = max(max(activatiematrix(ParVM.R==l))); 40 | end 41 | 42 | % Bepaal de vage uitgang 43 | uitgangsverloop = afknottenLidmaatschapsfuncties(discrety, parametery, activatiegraad); 44 | conclusie = max(uitgangsverloop')'; 45 | 46 | 47 | % Bereken het zwaartepunt van de vage uitgang 48 | y(i) = sum(discrety*conclusie)/sum(conclusie); 49 | 50 | end 51 | y = y'; 52 | -------------------------------------------------------------------------------- /Q-Learning and SARSA/Q_Predator.m: -------------------------------------------------------------------------------- 1 | (* ::Package:: *) 2 | 3 | muis = 30; 4 | 5 | 6 | (* ::Text:: *) 7 | (*Instellen van de parameters*) 8 | 9 | 10 | alpha=0.5; 11 | gamma=0.9; 12 | epsilon=0.1; 13 | kost=-0.005; 14 | 15 | 16 | (* ::Text:: *) 17 | (*Opbouwen van het doolhof waarin de kat de muist moet zoeken*) 18 | 19 | 20 | m = 6; 21 | n = 8; 22 | grid = ConstantArray[0,m*n]; 23 | muur = {10,12,14,18,20,22,26,36,37,38,39}; 24 | 25 | 26 | (* ::Text:: *) 27 | (*Enkele nuttige functies*) 28 | 29 | 30 | Muurtest[x_]:=Dimensions@Select[muur,#== x&]== {1} 31 | Selecteerburen[l_] := Select[Table[k,{k,1,m*n}],((#==l-1&& Mod[l-1,n] != 0)||(#== l+1&& Mod[l,n] != 0)||#== l-n||#== l+n )&] 32 | Selecteernietmuren[x_] := Select[x,!Muurtest[#]&] 33 | FastRF[a_List, b_List] := Module[{c, o, x}, c = Join[b, a]; o = Ordering[c]; x = 1 - 2 UnitStep[-1 - Length[b] + o]; x = FoldList[Max[#, 0] + #2 &, x]; x[[o]] = x; Pick[c, x, -1]] 34 | 35 | 36 | (* ::Text:: *) 37 | (*Opstellen van de Q matrix*) 38 | 39 | 40 | Q=Partition[ConstantArray[0,(m*n)^2],(m*n)]; 41 | Q[[All,muur]]=-1; 42 | 43 | 44 | If[Muurtest[muis],Export[StringJoin[{"Qkat",ToString[muis],".txt"}],Q];Quit[];] 45 | 46 | 47 | (* ::Text:: *) 48 | (*Trainen van de kat. De muis wordt mee gegeven via het shellscript, de kat wordt random in het rooster gezet.*) 49 | 50 | 51 | alleBuren=Map[Selecteernietmuren[Selecteerburen[#]]&,Table[k,{k,1,m*n}]]; katten=FastRF[Table[k,{k,1,m*n}],Join[{muis},muur]]; 52 | Monitor[Do[s=RandomSample[katten,1];If[t<5000,e=RandomReal[1],e=epsilon];s=s[[1]]; 53 | While[s!=muis, 54 | buren=alleBuren[[s]]; 55 | If[RandomReal[1]{-2->Pink,0->Yellow,2-> Red,1 -> Blue}],{t,1,First@Dimensions@figs,1}] 77 | 78 | 79 | Export[StringJoin[{"Qkat",ToString[muis],".txt"}],Q] 80 | 81 | 82 | Quit[]; 83 | -------------------------------------------------------------------------------- /Model Predictive Control/discrete_DMC.m: -------------------------------------------------------------------------------- 1 | function [sys,x0,str,Ts] = discrete_pid(t,x,in,flag,beta,K,Ts,u0) 2 | % Discrete DCM functie 3 | global previous; 4 | 5 | u0=0; 6 | switch flag, 7 | case 0, 8 | [sys,x0,str,Ts] = mdlInitializeSizes(Ts,beta,u0); 9 | case 2, 10 | sys = mdlUpdate(t,x,in); 11 | case 3, 12 | sys = mdlOutputs(t,x,in,beta,K); 13 | case 9, 14 | sys = []; 15 | otherwise 16 | error(['unhandled flag = ',num2str(flag)]); 17 | end 18 | 19 | %============================================================================= 20 | % mdlInitializeSizes 21 | % Return the sizes, initial conditions, and sample times for the S-function. 22 | %============================================================================= 23 | function [sys,x0,str,Ts]=mdlInitializeSizes(Ts,beta,u0) 24 | 25 | global previous; 26 | 27 | sizes = simsizes; 28 | sizes.NumContStates = 0; 29 | sizes.NumDiscStates = 0; 30 | sizes.NumOutputs = 1; % de regelactie u 31 | sizes.NumInputs = 2; % gewenste waarde, meting 32 | sizes.DirFeedthrough = 1; 33 | sizes.NumSampleTimes = 1; 34 | 35 | sys = simsizes(sizes); 36 | 37 | x0 = []; 38 | str = []; 39 | ts = [Ts 0]; % Sample period 40 | 41 | m = size(beta,2); 42 | p = size(beta,1); 43 | 44 | previous.u = u0; 45 | previous.Du = zeros(m,1); 46 | previous.y_hat_0 = zeros(p,1); 47 | 48 | %======================================================================= 49 | % mdlUpdate 50 | % Handle discrete state updates, sample time hits, and major time step 51 | % requirements. 52 | %======================================================================= 53 | function sys = mdlUpdate(t,x,in) 54 | sys = []; 55 | 56 | %======================================================================= 57 | % mdlOutputs 58 | % Return the output vector for the S-function 59 | %======================================================================= 60 | function sys = mdlOutputs(t,x,in,beta,K) 61 | 62 | global previous; 63 | 64 | ysp = in(1); 65 | y = in(2); 66 | 67 | m = size(beta,2); 68 | p = size(beta,1); 69 | 70 | y_star(1:p,1) = ysp; 71 | 72 | y_hat_0(1:p-1,1)= previous.y_hat_0(2:end,1) + beta(2:end,1)*previous.Du(1,1); 73 | y_hat_0(p,1) = y_hat_0(p-1,1); 74 | 75 | w_hat(1:p,1) = y - previous.y_hat_0(1,1)+beta(1,1)*previous.Du(1,1); 76 | e = y_star - (y_hat_0 + w_hat); 77 | 78 | Du = [inv(beta'*beta + K^2*eye(m))*beta'*e]; 79 | 80 | sys = previous.u + Du(1); 81 | 82 | previous.Du = Du; 83 | previous.y_hat_0 = y_hat_0; 84 | previous.u = sys; -------------------------------------------------------------------------------- /LQ Control/LQControl_script.m: -------------------------------------------------------------------------------- 1 | %% Initialization 2 | 3 | % Parameters 4 | kin = 0; 5 | b1 = 0.02; 6 | d2 = 0.02; 7 | b2 = 0.01; 8 | d1 = 0.01; 9 | d3 = 0.01; 10 | a = 0.001; 11 | kV = 2000; 12 | Y = 100; 13 | k0 = -1.22*10^3; 14 | s0 = 500; 15 | v0 = -2.22; 16 | tijd = 100; 17 | 18 | % State-space system 19 | A = [b1-d1-Y*a 0 0; 20 | 0 b2-d2 0; 21 | a 0 -d3]; 22 | B = [1;0;0]; 23 | C = [1 0 0; 24 | 0 1 0; 25 | 0 0 1]; 26 | D = [0;0;0]; 27 | 28 | % Equilibrium points 29 | kev = (Y*a*kV)/(d1 - b1 + Y*a); 30 | vev = (a*kV*(b1 - d1))/(d3*(d1 - b1 + Y*a)); 31 | 32 | 33 | %% Uncontrolled state-space system 34 | sim('noControl') 35 | 36 | %% LQ Controlled state-space system 37 | 38 | % Transformation and control matrix (see calculation1.nb) 39 | T = [1 0 0; 40 | 0 0 1; 41 | 0 1 0]; 42 | K = [-1.9 -980.1 0]*inv(T); 43 | 44 | sim('LQControl') 45 | 46 | 47 | %% Uncontrolled state-space system with state observer 48 | 49 | % State-space system, the output matrices are other than in the system 50 | % without observer (otherwise, no observer would be needed) 51 | A2 = A; 52 | B2 = B; 53 | C2 = [0.5 0.4 0; 54 | 0 0 2]; 55 | D2 = [0;0]; 56 | 57 | % Observer matrix (see calculations1.nb) 58 | H = [1 1; 59 | 1 1; 60 | 0 1]; 61 | AS = A2-H*C2; 62 | BS = [H B2-H*D2]; 63 | CS = [1 0 0; 64 | 0 1 0; 65 | 0 0 1]; 66 | DS = [0 0 0; 67 | 0 0 0; 68 | 0 0 0]; 69 | 70 | sim('noControlObserver') 71 | 72 | %% LQ Controlled state-space system with state observer 73 | % The same weights vector K for the LQ controller is used as in the system 74 | % without observer 75 | 76 | sim('LQControlObserver') 77 | 78 | %% LQ Controlled state-space system with reduced order state observer 79 | 80 | % Transformation matrices 81 | TR = [1 0 0;C2]; 82 | HR = [-22.75 0]; 83 | 84 | % Transformed matrices 85 | AT2 = TR*A2*inv(TR); 86 | BT2 = TR*B2; 87 | CT2 = C2*inv(TR); 88 | 89 | % Reduced order observer 90 | AR = AT2(1,1) - HR*AT2(2:3,1); 91 | BR = [(AT2(1,1)-HR*AT2(2:3,1))*HR + AT2(1,2:3)-HR*AT2(2:3,2:3) BT2(1)-HR*BT2(2:3) - (AT2(1,1)-HR*AT2(2:3,1))*HR*D2]; 92 | CR = 1; 93 | DR = [0 0 0]; 94 | init = 0 - HR*C2*[k0-kev;s0;v0-vev] + HR * D2 * kin; 95 | 96 | sim('LQControlReducedOrderObserver') 97 | 98 | %% Plot simulation results 99 | % Run this segment after the chosen simulation 100 | t = simout(:,1); 101 | k = simout(:,2); 102 | s = simout(:,3); 103 | v = simout(:,4); 104 | subplot(3,1,1) 105 | hold on 106 | plot(t,k+kev) 107 | legend('k') 108 | subplot(3,1,2) 109 | hold on 110 | plot(t,s) 111 | legend('s') 112 | subplot(3,1,3) 113 | hold on 114 | plot(t,v+vev) 115 | legend('v') 116 | suptitle('LQ Control, Reduced Order Observer') -------------------------------------------------------------------------------- /PID Control/README.md: -------------------------------------------------------------------------------- 1 | # PID Control 2 | 3 | A standard PID controller is implemented in Simulink and MATLAB. The influence of the different control settings is studied. 4 | 5 | 6 | The PID tuning will perform less optimal if their is a measurement delay. 7 | 8 | 9 | 10 | To efficiently tune the system, control margins are plotted on a BODE-plot for a system of respectively first, second and third order. 11 | 12 | 13 | 14 | We will now tune the PID controller. First the state without control. 15 | 16 | 17 | 18 | The open loop response. 19 | 20 | 21 | 22 | And then the calculated optimal PID control. 23 | 24 | 25 | 26 | Lastly, a PID-feedbackward controller is combined with a feedforward controller. We assume the noise distrubing the system is perfectly characterised. This combination effectively maintains the desire state. 27 | 28 | 29 | -------------------------------------------------------------------------------- /Q-Learning and SARSA/SARSA_Prey.m: -------------------------------------------------------------------------------- 1 | (* ::Package:: *) 2 | 3 | (* ::Text:: *) 4 | (*Instellen van de parameters*) 5 | 6 | 7 | alpha=0.5; 8 | gamma=0.9; 9 | epsilon=0.1; 10 | kost=-0.005; 11 | kaas=8; 12 | katkost = -1.8; 13 | maxit = 20; (*wordt enkel gebruikt indien kat op positie 15*) 14 | 15 | 16 | (*kat = 16;*) 17 | 18 | 19 | (* ::Text:: *) 20 | (*Opbouwen van het doolhof waarin de kat de muist moet zoeken*) 21 | 22 | 23 | m = 6; 24 | n = 8; 25 | grid = ConstantArray[0,m*n]; 26 | muur = {10,12,14,18,20,22,26,36,37,38,39}; 27 | 28 | 29 | (* ::Text:: *) 30 | (*Enkele nuttige functies*) 31 | 32 | 33 | Muurtest[x_]:=Dimensions@Select[muur,#== x&]== {1} 34 | Selecteerburen[l_] := Select[Table[k,{k,1,m*n}],((#==l-1&& Mod[l-1,n] != 0)||(#== l+1&& Mod[l,n] != 0)||#== l-n||#== l+n )&] 35 | Selecteernietmuren[x_] := Select[x,!Muurtest[#]&] 36 | FastRF[a_List, b_List] := Module[{c, o, x}, c = Join[b, a]; o = Ordering[c]; x = 1 - 2 UnitStep[-1 - Length[b] + o]; x = FoldList[Max[#, 0] + #2 &, x]; x[[o]] = x; Pick[c, x, -1]] 37 | 38 | 39 | (* ::Text:: *) 40 | (*Opstellen van de Q matrix*) 41 | 42 | 43 | Q=Partition[ConstantArray[0,(m*n)^2],(m*n)]; 44 | Q[[All,muur]]=-1; 45 | 46 | 47 | If[Muurtest[kat]||kat==49,Export[StringJoin[{"QmuisSa",ToString[kat],".txt"}],Q];Quit[];] 48 | 49 | 50 | (* ::Text:: *) 51 | (*Trainen van de muis. De kat wordt mee gegeven via het shel script, de kat wordt random in het rooster gezet.*) 52 | 53 | 54 | alleBuren=Map[Selecteernietmuren[Selecteerburen[#]]&,Table[k,{k,1,m*n}]];muizen=FastRF[Table[k,{k,1,m*n}],Join[{kat},muur]]; 55 | Monitor[Do[l=0;s=RandomSample[muizen,1];s=s[[1]];e=epsilon;buren=alleBuren[[s]]; 56 | If[RandomReal[1]{-2->Pink,0->Yellow,2-> Blue,-1 -> Red,1 -> Green}],{t,1,First@Dimensions@figs,1}]*) 77 | 78 | 79 | Export[StringJoin[{"QmuisSa",ToString[kat],".txt"}],Q] 80 | 81 | 82 | Quit[]; 83 | -------------------------------------------------------------------------------- /Fuzzy Logic/data.txt: -------------------------------------------------------------------------------- 1 | 2.5479786e+001 6.5034708e+001 2 | 4.3048905e+000 1.8600344e+001 3 | 9.3281603e+001 8.0068052e+001 4 | 1.0314263e+001 4.9971613e+001 5 | 9.2313846e+001 9.2171021e+001 6 | 8.0151522e+001 1.4077974e+001 7 | 7.2772558e+001 1.7968446e+001 8 | 3.4933261e+001 9.3359561e+001 9 | 8.5484738e+001 4.4513908e+001 10 | 5.5819634e+001 3.3579275e+001 11 | 8.4238908e+001 2.1227895e+001 12 | 8.3996125e+001 4.2507078e+001 13 | 3.6788281e+001 7.2892238e+000 14 | 6.8696952e+001 7.7968250e+001 15 | 8.9425548e+001 6.3333576e+001 16 | 8.6077149e+001 4.6787082e+001 17 | 7.2572222e+001 2.0211393e+001 18 | 9.0316491e+001 4.6226675e+000 19 | 9.0195516e+001 4.3242059e+001 20 | 6.6042085e+001 8.8032984e+001 21 | 8.7006319e+001 3.4618712e+001 22 | 9.3547725e+001 5.2555777e+001 23 | 5.1152219e+001 2.4671070e+001 24 | 1.7932783e+001 4.6051043e+001 25 | 6.9529147e+001 8.7849355e+001 26 | 7.7244197e+001 5.1600732e+001 27 | 1.0818423e+001 8.7858690e+001 28 | 2.1690470e+000 1.3436685e+001 29 | 4.1350216e+001 7.0349018e+001 30 | 6.1586542e+001 2.4704101e+001 31 | 7.0178441e+001 1.8119116e+001 32 | 9.6611238e+001 2.6328021e+001 33 | 7.0386735e+001 9.5311641e+001 34 | 4.0347008e+001 9.5524161e+001 35 | 9.5800880e+001 9.6241897e+001 36 | 2.7727615e+001 3.3104601e+001 37 | 7.3230249e+001 5.0274895e+000 38 | 9.0767044e+001 7.8920437e+001 39 | 8.2087961e+001 1.0200366e+001 40 | 5.0542366e+001 1.1701018e+001 41 | 2.9160882e+001 8.9608675e+001 42 | 3.6165037e+001 3.4265925e+001 43 | 8.3999802e+001 4.4066026e+001 44 | 2.3635171e+001 1.6422190e+000 45 | 5.8613105e+001 7.8432382e+001 46 | 7.5617171e+001 6.5807767e+001 47 | 6.2169274e+001 1.3868634e+000 48 | 9.7215304e+001 4.3927053e+001 49 | 2.1862160e+001 1.3538582e+001 50 | 9.8693084e+001 1.7413798e+001 51 | 3.8115455e+001 4.7812738e+001 52 | 9.5595944e+001 8.9779048e+001 53 | 5.2379664e+001 6.8651965e+001 54 | 7.7351826e+001 9.1693840e+000 55 | 2.4620559e+001 5.9908091e+001 56 | 4.8029125e+001 3.2682498e+001 57 | 9.1706960e+001 7.1515431e+001 58 | 4.2599466e+001 5.2398628e+001 59 | 9.3652922e+001 5.7431491e+001 60 | 3.2056722e+001 5.4105787e+001 61 | 5.2910416e-001 3.1444763e+001 62 | 9.1925117e+001 9.9531609e+001 63 | 3.4001352e+001 1.1924782e+001 64 | 9.9406449e+001 1.0700198e+001 65 | 2.2540881e+001 7.7755010e+001 66 | 2.9840139e+001 3.1241785e+001 67 | 8.2846816e+001 9.5885133e+001 68 | 9.6925948e+001 2.3975686e+001 69 | 4.7993099e+001 5.6870781e+001 70 | 8.8450665e+001 1.6841388e-002 71 | 1.8307034e+001 8.3134929e+001 72 | 8.6831073e+001 1.9002812e+001 73 | 2.5095817e+001 1.9313706e+001 74 | 4.6269415e+001 1.4857561e+001 75 | 8.1541870e+001 5.2675164e+000 76 | 6.9814030e+001 2.7482162e+001 77 | 4.3554510e+001 9.9455536e+001 78 | 5.1732767e+000 3.0826128e+001 79 | 3.3405836e+001 4.8904829e+001 80 | 1.2831557e+001 2.0346409e+001 81 | 4.5715902e+000 5.7706329e+001 82 | 6.9743460e+001 7.8227028e+001 83 | 7.7013710e+001 6.2123238e+001 84 | 6.0947503e+001 9.0959154e+001 85 | 3.9268030e+001 9.8972171e+001 86 | 3.7318206e+001 8.3750494e+001 87 | 7.8722721e+000 1.1639486e+001 88 | 6.2480020e+001 4.7606065e+001 89 | 2.6482362e+001 8.6232642e+001 90 | 2.0712268e+001 5.0534445e+001 91 | 4.4994934e+001 7.1033186e+001 92 | 3.2528340e+001 9.5123982e+001 93 | 9.7670865e+001 3.8865246e+001 94 | 6.5532674e+001 1.7250683e+001 95 | 5.0738530e+001 4.8312911e+001 96 | 7.8785527e+001 5.7308839e+001 97 | 1.1748755e+001 2.8753968e+001 98 | 8.0283826e+001 9.6308300e+001 99 | 1.6878366e+001 6.1686102e+001 100 | 2.1057666e+001 7.0659141e+001 101 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Control-and-AI-Algorithms 2 | Implementations of Control (PID, LQ, MPC, ...) and AI (fuzzy logic, Q-learner, SARSA, ...). 3 | The algorithms are briefly discussed in this readme, and some results are shown. For detailed explanation, see the readme's of each project. 4 | 5 | Overview: 6 | 1. [Fuzzy Logic](https://github.com/WardQ/Control-and-AI-Algorithms/tree/master/Fuzzy%20Logic) 7 | 2. [LQ Control](https://github.com/WardQ/Control-and-AI-Algorithms/tree/master/LQ%20Control) 8 | 3. [Model Predictive Control](https://github.com/WardQ/Control-and-AI-Algorithms/tree/master/Model%20Predictive%20Control) 9 | 4. [PID Control](https://github.com/WardQ/Control-and-AI-Algorithms/tree/master/PID%20Control) 10 | 5. [Q-learners and SARSA](https://github.com/WardQ/Control-and-AI-Algorithms/tree/master/Q-Learning%20and%20SARSA) 11 | 6. [System Analysis](https://github.com/WardQ/Control-and-AI-Algorithms/tree/master/System%20Analysis) 12 | 13 | ## 1. [Fuzzy Logic](https://github.com/WardQ/Control-and-AI-Algorithms/tree/master/Fuzzy%20Logic) 14 | 15 | Implementation of Fuzzy Logic in MATLAB. In Fuzzy Logic, the truth values of variables may be any real number between 0 and 1. 16 | Therefore, it can handle 'partial truth', where the truth value may range between completely true and completely false. 17 | 18 | ## 2. [LQ Control](https://github.com/WardQ/Control-and-AI-Algorithms/tree/master/LQ%20Control) 19 | 20 | LQ control is implemented using Simulink and MATLAB. 21 | 22 | First the situation without control. All variables will go towards their equilibrium values. 23 | 24 | 25 | 26 | With LQ control, the controllable variables (k and v) will go towards the desired value. Uncontrollable variables (s) cannot be controlled. 27 | 28 | 29 | 30 | Sometimes, some variables cannot be measered directly. An observer will estimate these values. 31 | 32 | 33 | 34 | The observer can be combined with LQ control. 35 | 36 | 37 | 38 | Finally, a reduced order observer can be used as well. 39 | 40 | 41 | 42 | To achieve optimal control, the controlmatrix can be optimized (on an other system). 43 | 44 | 45 | 46 | ## 3. [Model Predictive Control](https://github.com/WardQ/Control-and-AI-Algorithms/tree/master/Model%20Predictive%20Control) 47 | 48 | Implementation of MPC on a basic system with the following uncontrolled step response. 49 | 50 | 51 | 52 | After optimization of the parameters, the model predictive control algorithm will accurately responds on a change in the set point. Left the response, right the taken control action. 53 | 54 | 55 | 56 | The calculations done by the MPC around the change in stepoint are visualised below: 57 | 58 | 59 | 60 | The impact of the parameters m and p is visualised: 61 | 62 | 63 | 64 | ## 4. [PID Control](https://github.com/WardQ/Control-and-AI-Algorithms/tree/master/PID%20Control) 65 | A standard PID controller is implemented in Simulink and MATLAB. The influence of the different control settings is studied. 66 | 67 | 68 | The PID tuning will perform less optimal if their is a measurement delay. 69 | 70 | 71 | 72 | To efficiently tune the system, control margins are plotted on a BODE-plot for a system of respectively first, second and third order. 73 | 74 | 75 | 76 | We will now tune the PID controller. First the state without control. 77 | 78 | 79 | 80 | The open loop response. 81 | 82 | 83 | 84 | And then the calculated optimal PID control. 85 | 86 | 87 | 88 | Lastly, a PID-feedbackward controller is combined with a feedforward controller. We assume the noise distrubing the system is perfectly characterised. This combination effectively maintains the desire state. 89 | 90 | 91 | 92 | ## 5. [Q-learners and SARSA](https://github.com/WardQ/Control-and-AI-Algorithms/tree/master/Q-Learning%20and%20SARSA) 93 | 94 | Q-Learning and SARSA algorithms are used to let an imaginary cat (red) through a maze. Besides not running into the walls, the cat tries to locate the mouse (blue). 95 | 96 | 97 | 98 | ## 6. [System Analysis](https://github.com/WardQ/Control-and-AI-Algorithms/tree/master/System%20Analysis) 99 | 100 | Several systems are investigated with Bode and Nyquist plots. 101 | 102 | A first order system. 103 | 104 | 105 | 106 | A second order system. 107 | 108 | 109 | 110 | A third order system. 111 | 112 | 113 | 114 | Root locus analysis is performed on these three systems. 115 | 116 | 117 | -------------------------------------------------------------------------------- /LQ Control/calculations1.nb: -------------------------------------------------------------------------------- 1 | (* Content-type: application/vnd.wolfram.mathematica *) 2 | 3 | (*** Wolfram Notebook File ***) 4 | (* http://www.wolfram.com/nb *) 5 | 6 | (* CreatedBy='Mathematica 11.0' *) 7 | 8 | (*CacheID: 234*) 9 | (* Internal cache information: 10 | NotebookFileLineBreakTest 11 | NotebookFileLineBreakTest 12 | NotebookDataPosition[ 158, 7] 13 | NotebookDataLength[ 24140, 767] 14 | NotebookOptionsPosition[ 22558, 710] 15 | NotebookOutlinePosition[ 22901, 725] 16 | CellTagsIndexPosition[ 22858, 722] 17 | WindowFrame->Normal*) 18 | 19 | (* Beginning of Notebook Content *) 20 | Notebook[{ 21 | 22 | Cell[CellGroupData[{ 23 | Cell[BoxData[{ 24 | RowBox[{ 25 | RowBox[{"ds", " ", "=", " ", 26 | RowBox[{ 27 | RowBox[{ 28 | RowBox[{"Q", "/", "V"}], "*", 29 | RowBox[{"(", 30 | RowBox[{"sin", "-", "s"}], ")"}]}], "-", 31 | RowBox[{"e", " ", "s"}]}]}], ";"}], "\[IndentingNewLine]", 32 | RowBox[{ 33 | RowBox[{"dp", " ", "=", " ", 34 | RowBox[{ 35 | RowBox[{ 36 | RowBox[{"Q", "/", "V"}], "*", 37 | RowBox[{"(", 38 | RowBox[{"pin", "-", "p"}], ")"}]}], "+", 39 | RowBox[{"e", " ", "s"}], " ", "-", 40 | RowBox[{"(", 41 | RowBox[{"p", "-", "pr"}], ")"}]}]}], ";"}], "\[IndentingNewLine]", 42 | RowBox[{ 43 | RowBox[{"dx", " ", "=", " ", 44 | RowBox[{ 45 | RowBox[{ 46 | RowBox[{ 47 | RowBox[{"-", "Q"}], "/", "V"}], "*", "x"}], "+", 48 | RowBox[{"(", 49 | RowBox[{"p", "-", "pr"}], ")"}], "+", 50 | RowBox[{"k", 51 | RowBox[{"(", 52 | RowBox[{"x", "-", "xr"}], ")"}]}]}]}], ";"}], "\[IndentingNewLine]", 53 | RowBox[{"Solve", "[", 54 | RowBox[{ 55 | RowBox[{ 56 | RowBox[{"{", 57 | RowBox[{ 58 | RowBox[{"ds", "\[Equal]", "0"}], ",", 59 | RowBox[{"dp", "\[Equal]", "0"}], ",", 60 | RowBox[{"dx", "\[Equal]", "0"}]}], "}"}], "/.", 61 | RowBox[{"{", 62 | RowBox[{ 63 | RowBox[{"sin", "\[Rule]", "0"}], ",", 64 | RowBox[{"pin", "\[Rule]", "0"}]}], "}"}]}], ",", 65 | RowBox[{"{", 66 | RowBox[{"s", ",", "p", ",", "x"}], "}"}]}], "]"}]}], "Input", 67 | CellChangeTimes->{{3.6940686467993*^9, 3.6940687013022614`*^9}, { 68 | 3.6940689755627427`*^9, 3.694069064240223*^9}}], 69 | 70 | Cell[BoxData[ 71 | RowBox[{"{", 72 | RowBox[{"{", 73 | RowBox[{ 74 | RowBox[{"s", "\[Rule]", "0"}], ",", 75 | RowBox[{"p", "\[Rule]", 76 | FractionBox[ 77 | RowBox[{"pr", " ", "V"}], 78 | RowBox[{"Q", "+", "V"}]]}], ",", 79 | RowBox[{"x", "\[Rule]", 80 | RowBox[{"-", 81 | FractionBox[ 82 | RowBox[{ 83 | RowBox[{"pr", " ", "Q", " ", "V"}], "+", 84 | RowBox[{"k", " ", "Q", " ", "V", " ", "xr"}], "+", 85 | RowBox[{"k", " ", 86 | SuperscriptBox["V", "2"], " ", "xr"}]}], 87 | RowBox[{ 88 | RowBox[{"(", 89 | RowBox[{"Q", "+", "V"}], ")"}], " ", 90 | RowBox[{"(", 91 | RowBox[{"Q", "-", 92 | RowBox[{"k", " ", "V"}]}], ")"}]}]]}]}]}], "}"}], "}"}]], "Output", 93 | CellChangeTimes->{{3.694069035043457*^9, 3.6940690648286686`*^9}}] 94 | }, Open ]], 95 | 96 | Cell[BoxData[{ 97 | RowBox[{ 98 | RowBox[{"sster", " ", "=", " ", 99 | RowBox[{"s", "+", "0"}]}], ";"}], "\[IndentingNewLine]", 100 | RowBox[{ 101 | RowBox[{"pster", " ", "=", " ", 102 | RowBox[{"p", " ", "+", " ", 103 | FractionBox[ 104 | RowBox[{"pr", " ", "V"}], 105 | RowBox[{"Q", "+", "V"}]]}]}], ";"}], "\[IndentingNewLine]", 106 | RowBox[{ 107 | RowBox[{"xster", " ", "=", " ", 108 | RowBox[{"x", " ", "+", " ", 109 | RowBox[{"-", 110 | FractionBox[ 111 | RowBox[{ 112 | RowBox[{"pr", " ", "Q", " ", "V"}], "+", 113 | RowBox[{"k", " ", "Q", " ", "V", " ", "xr"}], "+", 114 | RowBox[{"k", " ", 115 | SuperscriptBox["V", "2"], " ", "xr"}]}], 116 | RowBox[{ 117 | RowBox[{"(", 118 | RowBox[{"Q", "+", "V"}], ")"}], " ", 119 | RowBox[{"(", 120 | RowBox[{"Q", "-", 121 | RowBox[{"k", " ", "V"}]}], ")"}]}]]}]}]}], ";"}]}], "Input", 122 | CellChangeTimes->{{3.6940691172951994`*^9, 3.6940691452384095`*^9}, { 123 | 3.694069250045699*^9, 3.694069269067871*^9}}], 124 | 125 | Cell[CellGroupData[{ 126 | 127 | Cell[BoxData[{ 128 | RowBox[{"dsster", " ", "=", " ", 129 | RowBox[{"ds", "/.", 130 | RowBox[{"{", 131 | RowBox[{ 132 | RowBox[{"s", "\[Rule]", "sster"}], ",", 133 | RowBox[{"p", "\[Rule]", "pster"}], ",", 134 | RowBox[{"x", "\[Rule]", "xster"}]}], "}"}]}]}], "\[IndentingNewLine]", 135 | RowBox[{"dpster", " ", "=", " ", 136 | RowBox[{ 137 | RowBox[{"dp", "/.", 138 | RowBox[{"{", 139 | RowBox[{ 140 | RowBox[{"s", "\[Rule]", "sster"}], ",", 141 | RowBox[{"p", "\[Rule]", "pster"}], ",", 142 | RowBox[{"x", "\[Rule]", "xster"}]}], "}"}]}], "//", 143 | "Simplify"}]}], "\[IndentingNewLine]", 144 | RowBox[{"dxster", " ", "=", " ", 145 | RowBox[{ 146 | RowBox[{"dx", "/.", 147 | RowBox[{"{", 148 | RowBox[{ 149 | RowBox[{"s", "\[Rule]", "sster"}], ",", 150 | RowBox[{"p", "\[Rule]", "pster"}], ",", 151 | RowBox[{"x", "\[Rule]", "xster"}]}], "}"}]}], "//", 152 | "Simplify"}]}], "\[IndentingNewLine]"}], "Input", 153 | CellChangeTimes->{{3.694069092068947*^9, 3.6940691120509453`*^9}, { 154 | 3.6940691481782436`*^9, 3.694069193543984*^9}, 3.69406925952837*^9}], 155 | 156 | Cell[BoxData[ 157 | RowBox[{ 158 | RowBox[{ 159 | RowBox[{"-", "e"}], " ", "s"}], "+", 160 | FractionBox[ 161 | RowBox[{"Q", " ", 162 | RowBox[{"(", 163 | RowBox[{ 164 | RowBox[{"-", "s"}], "+", "sin"}], ")"}]}], "V"]}]], "Output", 165 | CellChangeTimes->{{3.6940691561721373`*^9, 3.6940691938735867`*^9}, 166 | 3.694069262352397*^9}], 167 | 168 | Cell[BoxData[ 169 | FractionBox[ 170 | RowBox[{ 171 | RowBox[{"pin", " ", "Q"}], "+", 172 | RowBox[{"2", " ", "pr", " ", "V"}], "+", 173 | RowBox[{"e", " ", "s", " ", "V"}], "-", 174 | RowBox[{"p", " ", 175 | RowBox[{"(", 176 | RowBox[{"Q", "+", "V"}], ")"}]}]}], "V"]], "Output", 177 | CellChangeTimes->{{3.6940691561721373`*^9, 3.6940691938735867`*^9}, 178 | 3.694069262352397*^9}], 179 | 180 | Cell[BoxData[ 181 | RowBox[{"p", "-", 182 | RowBox[{"2", " ", "pr"}], "+", 183 | RowBox[{"k", " ", "x"}], "-", 184 | FractionBox[ 185 | RowBox[{"Q", " ", "x"}], "V"], "-", 186 | RowBox[{"2", " ", "k", " ", "xr"}]}]], "Output", 187 | CellChangeTimes->{{3.6940691561721373`*^9, 3.6940691938735867`*^9}, 188 | 3.694069262367997*^9}] 189 | }, Open ]], 190 | 191 | Cell[CellGroupData[{ 192 | 193 | Cell[BoxData[{ 194 | RowBox[{ 195 | RowBox[{"(", 196 | RowBox[{"A1", " ", "=", " ", 197 | RowBox[{"{", 198 | RowBox[{ 199 | RowBox[{"{", 200 | RowBox[{ 201 | RowBox[{ 202 | RowBox[{"-", "e"}], "-", 203 | RowBox[{"q", "/", "v"}]}], ",", "0", ",", "0"}], "}"}], ",", 204 | RowBox[{"{", 205 | RowBox[{"e", ",", " ", 206 | RowBox[{ 207 | RowBox[{"-", "1"}], "-", 208 | RowBox[{"q", "/", "v"}]}], ",", " ", "0"}], "}"}], ",", 209 | RowBox[{"{", 210 | RowBox[{"0", ",", "1", ",", 211 | RowBox[{ 212 | RowBox[{ 213 | RowBox[{"-", "q"}], "/", "v"}], "+", "k"}]}], "}"}]}], "}"}]}], 214 | ")"}], "//", "MatrixForm"}], "\[IndentingNewLine]", 215 | RowBox[{ 216 | RowBox[{"(", 217 | RowBox[{"B1", " ", "=", " ", 218 | RowBox[{"{", 219 | RowBox[{ 220 | RowBox[{"{", "0", "}"}], ",", 221 | RowBox[{"{", 222 | RowBox[{"q", "/", "v"}], "}"}], ",", 223 | RowBox[{"{", "0", "}"}]}], "}"}]}], ")"}], "//", 224 | "MatrixForm"}], "\[IndentingNewLine]", 225 | RowBox[{ 226 | RowBox[{"(", 227 | RowBox[{"C1", " ", "=", " ", 228 | RowBox[{"{", 229 | RowBox[{"{", 230 | RowBox[{"1", ",", "0", ",", "0"}], "}"}], "}"}]}], ")"}], "//", 231 | "MatrixForm"}], "\[IndentingNewLine]", 232 | RowBox[{ 233 | RowBox[{"(", 234 | RowBox[{"D1", " ", "=", " ", 235 | RowBox[{"{", 236 | RowBox[{"{", "0", "}"}], "}"}]}], ")"}], "//", "MatrixForm"}]}], "Input", 237 | CellChangeTimes->{{3.6940697856972227`*^9, 3.6940698763530684`*^9}, { 238 | 3.6940710169146943`*^9, 3.6940710521530943`*^9}, {3.69407166607399*^9, 239 | 3.694071688739256*^9}, {3.6940717328996716`*^9, 3.6940717538687687`*^9}}], 240 | 241 | Cell[BoxData[ 242 | TagBox[ 243 | RowBox[{"(", "\[NoBreak]", GridBox[{ 244 | { 245 | RowBox[{ 246 | RowBox[{"-", "e"}], "-", 247 | FractionBox["q", "v"]}], "0", "0"}, 248 | {"e", 249 | RowBox[{ 250 | RowBox[{"-", "1"}], "-", 251 | FractionBox["q", "v"]}], "0"}, 252 | {"0", "1", 253 | RowBox[{"k", "-", 254 | FractionBox["q", "v"]}]} 255 | }, 256 | GridBoxAlignment->{ 257 | "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 258 | "RowsIndexed" -> {}}, 259 | GridBoxSpacings->{"Columns" -> { 260 | Offset[0.27999999999999997`], { 261 | Offset[0.7]}, 262 | Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { 263 | Offset[0.2], { 264 | Offset[0.4]}, 265 | Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 266 | Function[BoxForm`e$, 267 | MatrixForm[BoxForm`e$]]]], "Output", 268 | CellChangeTimes->{ 269 | 3.694071052599094*^9, {3.69407167667705*^9, 3.6940716891843004`*^9}, 270 | 3.6940717543528166`*^9}], 271 | 272 | Cell[BoxData[ 273 | TagBox[ 274 | RowBox[{"(", "\[NoBreak]", GridBox[{ 275 | {"0"}, 276 | { 277 | FractionBox["q", "v"]}, 278 | {"0"} 279 | }, 280 | GridBoxAlignment->{ 281 | "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 282 | "RowsIndexed" -> {}}, 283 | GridBoxSpacings->{"Columns" -> { 284 | Offset[0.27999999999999997`], { 285 | Offset[0.7]}, 286 | Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { 287 | Offset[0.2], { 288 | Offset[0.4]}, 289 | Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 290 | Function[BoxForm`e$, 291 | MatrixForm[BoxForm`e$]]]], "Output", 292 | CellChangeTimes->{ 293 | 3.694071052599094*^9, {3.69407167667705*^9, 3.6940716891843004`*^9}, 294 | 3.6940717543568172`*^9}], 295 | 296 | Cell[BoxData[ 297 | TagBox[ 298 | RowBox[{"(", "\[NoBreak]", GridBox[{ 299 | {"1", "0", "0"} 300 | }, 301 | GridBoxAlignment->{ 302 | "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 303 | "RowsIndexed" -> {}}, 304 | GridBoxSpacings->{"Columns" -> { 305 | Offset[0.27999999999999997`], { 306 | Offset[0.7]}, 307 | Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { 308 | Offset[0.2], { 309 | Offset[0.4]}, 310 | Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 311 | Function[BoxForm`e$, 312 | MatrixForm[BoxForm`e$]]]], "Output", 313 | CellChangeTimes->{ 314 | 3.694071052599094*^9, {3.69407167667705*^9, 3.6940716891843004`*^9}, 315 | 3.694071754358817*^9}], 316 | 317 | Cell[BoxData[ 318 | TagBox[ 319 | RowBox[{"(", "\[NoBreak]", GridBox[{ 320 | {"0"} 321 | }, 322 | GridBoxAlignment->{ 323 | "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 324 | "RowsIndexed" -> {}}, 325 | GridBoxSpacings->{"Columns" -> { 326 | Offset[0.27999999999999997`], { 327 | Offset[0.7]}, 328 | Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { 329 | Offset[0.2], { 330 | Offset[0.4]}, 331 | Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 332 | Function[BoxForm`e$, 333 | MatrixForm[BoxForm`e$]]]], "Output", 334 | CellChangeTimes->{ 335 | 3.694071052599094*^9, {3.69407167667705*^9, 3.6940716891843004`*^9}, 336 | 3.6940717543618174`*^9}] 337 | }, Open ]], 338 | 339 | Cell[CellGroupData[{ 340 | 341 | Cell[BoxData[ 342 | RowBox[{"Eigenvalues", "[", "A1", "]"}]], "Input", 343 | CellChangeTimes->{{3.6940710586720943`*^9, 3.694071061931094*^9}}], 344 | 345 | Cell[BoxData[ 346 | RowBox[{"{", 347 | RowBox[{ 348 | FractionBox[ 349 | RowBox[{ 350 | RowBox[{"-", "q"}], "-", "v"}], "v"], ",", 351 | FractionBox[ 352 | RowBox[{ 353 | RowBox[{"-", "q"}], "-", 354 | RowBox[{"e", " ", "v"}]}], "v"], ",", 355 | FractionBox[ 356 | RowBox[{ 357 | RowBox[{"-", "q"}], "+", 358 | RowBox[{"k", " ", "v"}]}], "v"]}], "}"}]], "Output", 359 | CellChangeTimes->{3.694071062446094*^9}] 360 | }, Open ]], 361 | 362 | Cell[CellGroupData[{ 363 | 364 | Cell[BoxData[ 365 | RowBox[{"ssm", " ", "=", " ", 366 | RowBox[{"StateSpaceModel", "[", 367 | RowBox[{"{", 368 | RowBox[{"A1", ",", "B1", ",", "C1", ",", "D1"}], "}"}], "]"}]}]], "Input", 369 | CellChangeTimes->{{3.6940712000518303`*^9, 3.6940712253238306`*^9}}], 370 | 371 | Cell[BoxData[ 372 | TemplateBox[{RowBox[{ 373 | RowBox[{"-", "e"}], "-", 374 | FractionBox["q", "v"]}],"0","0","0","e",RowBox[{ 375 | RowBox[{"-", "1"}], "-", 376 | FractionBox["q", "v"]}],"0",FractionBox["q", "v"],"0","1", 377 | RowBox[{"k", "-", 378 | FractionBox["q", "v"]}],"0","1","0","0","0",InterpretationBox[ 379 | "\[InvisibleSpace]", None],{ 380 | StateSpaceModel, { 381 | False, False, { 382 | False, False}}, {$CellContext`stname1, $CellContext`stname2, \ 383 | $CellContext`stname3}, {{Control`CommonDump`$DUMMY$}, { 384 | Control`CommonDump`$DUMMY$}, { 385 | Control`CommonDump`$DUMMY$, Control`CommonDump`$DUMMY$, 386 | Control`CommonDump`$DUMMY$}}, Identity, Automatic, 1, 1, 3, 1, {}, { 387 | False, False}, False, Automatic, None, Automatic},{}}, 388 | "StateSpaceModelFull", 389 | BaseStyle->{NumberMarks -> False}, 390 | DisplayFunction->(TagBox[ 391 | SubsuperscriptBox[ 392 | RowBox[{"(", 393 | GridBox[{{#, #2, #3, #4}, {#5, #6, #7, #8}, {#9, #10, #11, #12}, {#13, \ 394 | #14, #15, #16}}, AllowedDimensions -> {4, 4}, AutoDelete -> False, 395 | AllowScriptLevelChange -> False, ColumnAlignments -> {Center}, 396 | BaseStyle -> {Deployed -> False}, GridBoxItemStyle -> {}, 397 | GridBoxDividers -> {"Rows" -> {False, False, False, 398 | Directive[ 399 | GrayLevel[0], 400 | GrayLevel[0.6]], {False}, False}, 401 | "Columns" -> {False, False, False, 402 | Directive[ 403 | GrayLevel[0], 404 | GrayLevel[0.6]], {False}, False}}, 405 | GridBoxBackground -> {"Rows" -> {{ 406 | GrayLevel[1], 407 | RGBColor[0.8, 0.9, 0.9]}}}], ")"}], #17, 408 | ButtonBox[ 409 | GraphicsBox[{ 410 | RGBColor[0.8, 0.85, 0.85], 411 | EdgeForm[ 412 | RGBColor[0.6, 0.7, 0.7]], 413 | RectangleBox[{0, 0}, RoundingRadius -> Offset[2.5]], 414 | InsetBox[ 415 | StyleBox[ 416 | "\[ScriptCapitalS]", Control`NonlinearModelsDump`LineColor -> 417 | GrayLevel[0], Control`NonlinearModelsDump`FrontFaceColor -> 418 | GrayLevel[0], Control`NonlinearModelsDump`BackFaceColor -> 419 | GrayLevel[0], GraphicsColor -> GrayLevel[0], FontSize -> 12, 420 | FontColor -> GrayLevel[0]], {0.5, 0.5}]}, ImageSize -> 20], 421 | ButtonFunction :> Control`Typesetting`SystemsModelTypesetToggle[ 422 | ButtonNotebook[], FE`CMObj], Evaluator -> Automatic, Appearance -> 423 | None], MultilineFunction -> None], 424 | EventHandlerTag[{"MouseEntered" :> {FE`CMObj = MathLink`CallFrontEnd[ 425 | FrontEnd`Value[ 426 | FEPrivate`Self[]]]}, PassEventsDown -> True, PassEventsUp -> 427 | True}]]& ), 428 | InterpretationFunction->(RowBox[{"StateSpaceModel", "[", 429 | RowBox[{"{", 430 | RowBox[{"{", 431 | RowBox[{"{", 432 | TemplateSlotSequence[{1, 3}, ","], "}"}], ",", 433 | RowBox[{"{", 434 | TemplateSlotSequence[{5, 7}, ","], "}"}], ",", 435 | RowBox[{"{", 436 | TemplateSlotSequence[{9, 11}, ","], "}"}], "}"}], ",", 437 | RowBox[{"{", 438 | RowBox[{"{", 439 | TemplateSlotSequence[{4, 4}, ","], "}"}], ",", 440 | RowBox[{"{", 441 | TemplateSlotSequence[{8, 8}, ","], "}"}], ",", 442 | RowBox[{"{", 443 | TemplateSlotSequence[{12, 12}, ","], "}"}], "}"}], ",", 444 | RowBox[{"{", 445 | RowBox[{"{", 446 | TemplateSlotSequence[{13, 15}, ","], "}"}], "}"}], ",", 447 | RowBox[{"{", 448 | RowBox[{"{", 449 | TemplateSlotSequence[{16, 16}, ","], "}"}], "}"}], "}"}], ",", 450 | "SamplingPeriod", "->", 451 | RowBox[{#17}], ",", "SystemsModelLabels", "->", "None", "]"}]& ), 452 | Tooltip->StateSpaceModel]], "Output", 453 | CellChangeTimes->{ 454 | 3.69407122604183*^9, {3.694071681454528*^9, 3.694071694391821*^9}, 455 | 3.6940717568790693`*^9}] 456 | }, Open ]], 457 | 458 | Cell[CellGroupData[{ 459 | 460 | Cell[BoxData[ 461 | RowBox[{ 462 | RowBox[{"(", 463 | RowBox[{"P", "=", 464 | RowBox[{"ControllabilityMatrix", "[", "ssm", "]"}]}], ")"}], "//", 465 | "MatrixForm"}]], "Input", 466 | CellChangeTimes->{{3.6940712295218306`*^9, 3.6940712474518304`*^9}}], 467 | 468 | Cell[BoxData[ 469 | TagBox[ 470 | RowBox[{"(", "\[NoBreak]", GridBox[{ 471 | {"0", "0", "0"}, 472 | { 473 | FractionBox["q", "v"], 474 | FractionBox[ 475 | RowBox[{"q", " ", 476 | RowBox[{"(", 477 | RowBox[{ 478 | RowBox[{"-", "1"}], "-", 479 | FractionBox["q", "v"]}], ")"}]}], "v"], 480 | FractionBox[ 481 | RowBox[{"q", " ", 482 | SuperscriptBox[ 483 | RowBox[{"(", 484 | RowBox[{ 485 | RowBox[{"-", "1"}], "-", 486 | FractionBox["q", "v"]}], ")"}], "2"]}], "v"]}, 487 | {"0", 488 | FractionBox["q", "v"], 489 | RowBox[{ 490 | FractionBox[ 491 | RowBox[{"q", " ", 492 | RowBox[{"(", 493 | RowBox[{ 494 | RowBox[{"-", "1"}], "-", 495 | FractionBox["q", "v"]}], ")"}]}], "v"], "+", 496 | FractionBox[ 497 | RowBox[{"q", " ", 498 | RowBox[{"(", 499 | RowBox[{"k", "-", 500 | FractionBox["q", "v"]}], ")"}]}], "v"]}]} 501 | }, 502 | GridBoxAlignment->{ 503 | "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 504 | "RowsIndexed" -> {}}, 505 | GridBoxSpacings->{"Columns" -> { 506 | Offset[0.27999999999999997`], { 507 | Offset[0.7]}, 508 | Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { 509 | Offset[0.2], { 510 | Offset[0.4]}, 511 | Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 512 | Function[BoxForm`e$, 513 | MatrixForm[BoxForm`e$]]]], "Output", 514 | CellChangeTimes->{{3.6940712380488305`*^9, 3.69407124754183*^9}, 515 | 3.694071696630045*^9, 3.6940717614935308`*^9}] 516 | }, Open ]], 517 | 518 | Cell[CellGroupData[{ 519 | 520 | Cell[BoxData[ 521 | RowBox[{"MatrixRank", "[", "P", "]"}]], "Input", 522 | CellChangeTimes->{{3.6940717045638385`*^9, 3.6940717103074126`*^9}}], 523 | 524 | Cell[BoxData["2"], "Output", 525 | CellChangeTimes->{3.694071710793461*^9, 3.69407176369075*^9}] 526 | }, Open ]], 527 | 528 | Cell[CellGroupData[{ 529 | 530 | Cell[BoxData[ 531 | RowBox[{ 532 | RowBox[{"(", 533 | RowBox[{"T1", " ", "=", " ", 534 | RowBox[{"Transpose", "[", 535 | RowBox[{"{", 536 | RowBox[{ 537 | RowBox[{ 538 | RowBox[{ 539 | RowBox[{"P", "[", 540 | RowBox[{"[", 541 | RowBox[{"All", ",", "1"}], "]"}], "]"}], "/", "q"}], "*", "v"}], 542 | ",", 543 | RowBox[{ 544 | RowBox[{ 545 | RowBox[{"P", "[", 546 | RowBox[{"[", 547 | RowBox[{"All", ",", "2"}], "]"}], "]"}], "/", "q"}], "*", "v"}], 548 | ",", 549 | RowBox[{"{", 550 | RowBox[{"1", ",", "0", ",", "0"}], "}"}]}], "}"}], "]"}]}], ")"}], "//", 551 | "MatrixForm"}]], "Input", 552 | CellChangeTimes->{{3.6940717720915904`*^9, 3.6940718706514454`*^9}, { 553 | 3.6940719146378436`*^9, 3.694071918563236*^9}}], 554 | 555 | Cell[BoxData[ 556 | TagBox[ 557 | RowBox[{"(", "\[NoBreak]", GridBox[{ 558 | {"0", "0", "1"}, 559 | {"1", 560 | RowBox[{ 561 | RowBox[{"-", "1"}], "-", 562 | FractionBox["q", "v"]}], "0"}, 563 | {"0", "1", "0"} 564 | }, 565 | GridBoxAlignment->{ 566 | "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 567 | "RowsIndexed" -> {}}, 568 | GridBoxSpacings->{"Columns" -> { 569 | Offset[0.27999999999999997`], { 570 | Offset[0.7]}, 571 | Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { 572 | Offset[0.2], { 573 | Offset[0.4]}, 574 | Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 575 | Function[BoxForm`e$, 576 | MatrixForm[BoxForm`e$]]]], "Output", 577 | CellChangeTimes->{3.6940718290862894`*^9, 3.6940718713155117`*^9, 578 | 3.694071918932273*^9}] 579 | }, Open ]], 580 | 581 | Cell[CellGroupData[{ 582 | 583 | Cell[BoxData[{ 584 | RowBox[{ 585 | RowBox[{"(", 586 | RowBox[{"AT", " ", "=", " ", 587 | RowBox[{ 588 | RowBox[{"Inverse", "[", "T1", "]"}], ".", "A1", ".", "T1"}]}], ")"}], "//", 589 | "MatrixForm"}], "\[IndentingNewLine]", 590 | RowBox[{ 591 | RowBox[{"(", 592 | RowBox[{"BT", " ", "=", " ", 593 | RowBox[{ 594 | RowBox[{"Inverse", "[", "T1", "]"}], ".", "B1"}]}], ")"}], "//", 595 | "MatrixForm"}], "\[IndentingNewLine]", 596 | RowBox[{ 597 | RowBox[{"(", 598 | RowBox[{"CT", " ", "=", " ", 599 | RowBox[{"C1", ".", "T1"}]}], ")"}], "//", 600 | "MatrixForm"}], "\[IndentingNewLine]", 601 | RowBox[{ 602 | RowBox[{"(", 603 | RowBox[{"DT", " ", "=", " ", "D1"}], ")"}], "//", "MatrixForm"}]}], "Input", 604 | CellChangeTimes->{{3.6940718879311733`*^9, 3.6940718989452744`*^9}, { 605 | 3.6940719310934887`*^9, 3.694071992056585*^9}}], 606 | 607 | Cell[BoxData[ 608 | TagBox[ 609 | RowBox[{"(", "\[NoBreak]", GridBox[{ 610 | {"0", 611 | RowBox[{ 612 | RowBox[{"(", 613 | RowBox[{"k", "-", 614 | FractionBox["q", "v"]}], ")"}], " ", 615 | RowBox[{"(", 616 | RowBox[{"1", "+", 617 | FractionBox["q", "v"]}], ")"}]}], "e"}, 618 | {"1", 619 | RowBox[{ 620 | RowBox[{"-", "1"}], "+", "k", "-", 621 | FractionBox[ 622 | RowBox[{"2", " ", "q"}], "v"]}], "0"}, 623 | {"0", "0", 624 | RowBox[{ 625 | RowBox[{"-", "e"}], "-", 626 | FractionBox["q", "v"]}]} 627 | }, 628 | GridBoxAlignment->{ 629 | "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 630 | "RowsIndexed" -> {}}, 631 | GridBoxSpacings->{"Columns" -> { 632 | Offset[0.27999999999999997`], { 633 | Offset[0.7]}, 634 | Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { 635 | Offset[0.2], { 636 | Offset[0.4]}, 637 | Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 638 | Function[BoxForm`e$, 639 | MatrixForm[BoxForm`e$]]]], "Output", 640 | CellChangeTimes->{ 641 | 3.6940718039357743`*^9, {3.694071889106291*^9, 3.6940718995363336`*^9}, 642 | 3.694071992651644*^9}], 643 | 644 | Cell[BoxData[ 645 | TagBox[ 646 | RowBox[{"(", "\[NoBreak]", GridBox[{ 647 | { 648 | FractionBox["q", "v"]}, 649 | {"0"}, 650 | {"0"} 651 | }, 652 | GridBoxAlignment->{ 653 | "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 654 | "RowsIndexed" -> {}}, 655 | GridBoxSpacings->{"Columns" -> { 656 | Offset[0.27999999999999997`], { 657 | Offset[0.7]}, 658 | Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { 659 | Offset[0.2], { 660 | Offset[0.4]}, 661 | Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 662 | Function[BoxForm`e$, 663 | MatrixForm[BoxForm`e$]]]], "Output", 664 | CellChangeTimes->{ 665 | 3.6940718039357743`*^9, {3.694071889106291*^9, 3.6940718995363336`*^9}, 666 | 3.6940719926546445`*^9}], 667 | 668 | Cell[BoxData[ 669 | TagBox[ 670 | RowBox[{"(", "\[NoBreak]", GridBox[{ 671 | {"0", "0", "1"} 672 | }, 673 | GridBoxAlignment->{ 674 | "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 675 | "RowsIndexed" -> {}}, 676 | GridBoxSpacings->{"Columns" -> { 677 | Offset[0.27999999999999997`], { 678 | Offset[0.7]}, 679 | Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { 680 | Offset[0.2], { 681 | Offset[0.4]}, 682 | Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 683 | Function[BoxForm`e$, 684 | MatrixForm[BoxForm`e$]]]], "Output", 685 | CellChangeTimes->{ 686 | 3.6940718039357743`*^9, {3.694071889106291*^9, 3.6940718995363336`*^9}, 687 | 3.694071992656645*^9}], 688 | 689 | Cell[BoxData[ 690 | TagBox[ 691 | RowBox[{"(", "\[NoBreak]", GridBox[{ 692 | {"0"} 693 | }, 694 | GridBoxAlignment->{ 695 | "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 696 | "RowsIndexed" -> {}}, 697 | GridBoxSpacings->{"Columns" -> { 698 | Offset[0.27999999999999997`], { 699 | Offset[0.7]}, 700 | Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { 701 | Offset[0.2], { 702 | Offset[0.4]}, 703 | Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 704 | Function[BoxForm`e$, 705 | MatrixForm[BoxForm`e$]]]], "Output", 706 | CellChangeTimes->{ 707 | 3.6940718039357743`*^9, {3.694071889106291*^9, 3.6940718995363336`*^9}, 708 | 3.6940719926586447`*^9}] 709 | }, Open ]] 710 | }, 711 | WindowSize->{778, 859}, 712 | WindowMargins->{{567, Automatic}, {57, Automatic}}, 713 | FrontEndVersion->"11.0 for Microsoft Windows (64-bit) (July 28, 2016)", 714 | StyleDefinitions->"Default.nb" 715 | ] 716 | (* End of Notebook Content *) 717 | 718 | (* Internal cache information *) 719 | (*CellTagsOutline 720 | CellTagsIndex->{} 721 | *) 722 | (*CellTagsIndex 723 | CellTagsIndex->{} 724 | *) 725 | (*NotebookFileOutline 726 | Notebook[{ 727 | Cell[CellGroupData[{ 728 | Cell[580, 22, 1418, 45, 88, "Input"], 729 | Cell[2001, 69, 769, 23, 51, "Output"] 730 | }, Open ]], 731 | Cell[2785, 95, 943, 27, 114, "Input"], 732 | Cell[CellGroupData[{ 733 | Cell[3753, 126, 1018, 27, 88, "Input"], 734 | Cell[4774, 155, 308, 10, 47, "Output"], 735 | Cell[5085, 167, 357, 10, 47, "Output"], 736 | Cell[5445, 179, 302, 8, 46, "Output"] 737 | }, Open ]], 738 | Cell[CellGroupData[{ 739 | Cell[5784, 192, 1532, 46, 88, "Input"], 740 | Cell[7319, 240, 942, 29, 95, "Output"], 741 | Cell[8264, 271, 732, 22, 83, "Output"], 742 | Cell[8999, 295, 691, 19, 44, "Output"], 743 | Cell[9693, 316, 683, 19, 44, "Output"] 744 | }, Open ]], 745 | Cell[CellGroupData[{ 746 | Cell[10413, 340, 133, 2, 30, "Input"], 747 | Cell[10549, 344, 381, 14, 47, "Output"] 748 | }, Open ]], 749 | Cell[CellGroupData[{ 750 | Cell[10967, 363, 246, 5, 30, "Input"], 751 | Cell[11216, 370, 3668, 84, 134, "Output"] 752 | }, Open ]], 753 | Cell[CellGroupData[{ 754 | Cell[14921, 459, 231, 6, 30, "Input"], 755 | Cell[15155, 467, 1498, 47, 109, "Output"] 756 | }, Open ]], 757 | Cell[CellGroupData[{ 758 | Cell[16690, 519, 133, 2, 30, "Input"], 759 | Cell[16826, 523, 91, 1, 30, "Output"] 760 | }, Open ]], 761 | Cell[CellGroupData[{ 762 | Cell[16954, 529, 739, 23, 30, "Input"], 763 | Cell[17696, 554, 786, 23, 83, "Output"] 764 | }, Open ]], 765 | Cell[CellGroupData[{ 766 | Cell[18519, 582, 770, 22, 88, "Input"], 767 | Cell[19292, 606, 1126, 35, 97, "Output"], 768 | Cell[20421, 643, 735, 22, 83, "Output"], 769 | Cell[21159, 667, 694, 19, 44, "Output"], 770 | Cell[21856, 688, 686, 19, 77, "Output"] 771 | }, Open ]] 772 | } 773 | ] 774 | *) 775 | 776 | (* End of internal cache information *) 777 | 778 | -------------------------------------------------------------------------------- /Fuzzy Logic/refdata.txt: -------------------------------------------------------------------------------- 1 | 9.5012929e+01 1.5683487e+01 4.6666667e+01 2 | 2.3113851e+01 4.1635311e+01 6.7753269e+01 3 | 6.0684258e+01 9.4034869e+00 6.2663362e+01 4 | 4.8598247e+01 4.4994645e+01 5.3629308e+01 5 | 8.9129897e+01 8.6915243e+01 1.5311980e+01 6 | 7.6209683e+01 3.9161722e+01 5.2170260e+01 7 | 4.5646767e+01 2.5278365e+01 7.1066705e+01 8 | 1.8503643e+00 3.5438193e+01 7.4024959e+01 9 | 8.2140716e+01 7.4297797e+01 2.7394317e+01 10 | 4.4470336e+01 6.5083202e+01 4.3230460e+01 11 | 6.1543235e+01 9.3979304e+01 1.1550754e+01 12 | 7.9193704e+01 8.3279912e+01 1.9415729e+01 13 | 9.2181297e+01 4.6997787e+01 4.4880498e+01 14 | 7.3820725e+01 6.2986561e+01 3.5839453e+01 15 | 1.7626614e+01 5.8187848e+00 8.4704918e+01 16 | 4.0570621e+01 5.4218740e+01 4.9677074e+01 17 | 9.3546970e+01 4.5572596e+01 4.6130971e+01 18 | 9.1690444e+01 8.6308689e+01 1.6002470e+01 19 | 4.1027021e+01 8.5519697e+01 2.7635411e+01 20 | 8.9364953e+01 4.7225568e+01 4.4699414e+01 21 | 5.7891305e+00 7.8692439e+01 3.8985304e+01 22 | 3.5286813e+01 6.5598214e+01 4.7219301e+01 23 | 8.1316650e+01 3.9889599e-03 5.2470681e+01 24 | 9.8613007e-01 1.3123716e+01 8.4704918e+01 25 | 1.3889088e+01 4.9487476e+01 5.9205972e+01 26 | 2.0276522e+01 3.8333157e+00 8.4704918e+01 27 | 1.9872174e+01 2.2743581e+01 8.3162854e+01 28 | 6.0379248e+01 3.2788296e+01 5.4870192e+01 29 | 2.7218792e+01 8.9946879e+01 3.1701527e+01 30 | 1.9881427e+01 3.1373049e+01 7.7370295e+01 31 | 1.5273927e+00 2.5167601e+01 8.1683556e+01 32 | 7.4678568e+01 4.3298913e+01 4.8578706e+01 33 | 4.4509643e+01 8.4238224e+01 2.6456981e+01 34 | 9.3181458e+01 1.8448899e+01 4.6666667e+01 35 | 4.6599434e+01 5.0817921e+01 4.9814531e+01 36 | 4.1864947e+01 4.5223967e+01 5.5970815e+01 37 | 8.4622142e+01 3.2558444e+01 5.1362097e+01 38 | 5.2515250e+01 3.8007631e+01 6.0824292e+01 39 | 2.0264736e+01 8.8647996e+01 3.2542953e+01 40 | 6.7213747e+01 7.6126076e+01 2.5811783e+01 41 | 8.3811845e+01 8.8376633e+01 1.4084646e+01 42 | 1.9639514e+00 4.5740626e+01 6.2470382e+01 43 | 6.8127716e+01 7.9920229e+01 2.2412273e+01 44 | 3.7948102e+01 1.3407712e+01 8.0749735e+01 45 | 8.3179602e+01 6.5313688e+00 5.1573626e+01 46 | 5.0281288e+01 3.7514466e+01 6.2455347e+01 47 | 7.0947139e+01 3.7352297e+01 5.2832319e+01 48 | 4.2889237e+01 4.8402240e+01 5.2746363e+01 49 | 3.0461737e+01 9.6945923e+01 3.1332469e+01 50 | 1.8965375e+01 3.4206109e+01 7.5091529e+01 51 | 1.9343116e+01 2.5268926e+01 8.1620564e+01 52 | 6.8222322e+01 5.8488692e+01 3.7555282e+01 53 | 3.0276440e+01 5.2370359e+01 5.7209067e+01 54 | 5.4167385e+01 1.6341905e+01 6.9434480e+01 55 | 1.5087298e+01 4.8639815e+01 5.9812178e+01 56 | 6.9789848e+01 4.9606075e+01 4.2494736e+01 57 | 3.7837300e+01 8.4319408e+01 3.0130522e+01 58 | 8.6001160e+01 8.0619822e+01 2.1764670e+01 59 | 8.5365513e+01 8.5778560e+01 1.6594891e+01 60 | 5.9356291e+01 6.0975414e+01 3.6983702e+01 61 | 4.9655245e+01 5.6573037e+01 4.5719084e+01 62 | 8.9976918e+01 6.1189852e+01 3.6154793e+01 63 | 8.2162916e+01 1.0297652e+01 5.2078977e+01 64 | 6.4491038e+01 1.5831592e+01 5.9732283e+01 65 | 8.1797434e+01 4.1364986e+01 5.0246354e+01 66 | 6.6022756e+01 5.6041045e+01 3.8886437e+01 67 | 3.4197062e+01 2.6867729e+01 7.7012947e+01 68 | 2.8972590e+01 7.8425416e+01 3.9174144e+01 69 | 3.4119357e+01 3.8787078e+01 6.7329254e+01 70 | 5.3407902e+01 3.0983621e+00 7.0115547e+01 71 | 7.2711322e+01 5.8550183e+01 3.7523205e+01 72 | 3.0929016e+01 5.5855853e+01 5.4998262e+01 73 | 8.3849604e+01 2.0069557e+01 5.1222889e+01 74 | 5.6807246e+01 8.7421885e+00 6.6901774e+01 75 | 3.7041356e+01 9.3322986e+01 2.7095065e+01 76 | 7.0273991e+01 2.5937997e+01 5.6837201e+01 77 | 5.4657115e+01 2.0417139e+01 6.8487822e+01 78 | 4.4488020e+01 4.9208442e+00 7.6822381e+01 79 | 6.9456724e+01 6.0616094e+01 3.6453932e+01 80 | 6.2131013e+01 5.4634874e+01 3.9687139e+01 81 | 7.9482108e+01 9.5837436e+00 5.3265563e+01 82 | 9.5684345e+01 6.3699565e+01 3.4881590e+01 83 | 5.2259035e+01 4.4294833e+01 5.3192168e+01 84 | 8.8014221e+01 6.6381959e+00 4.8481489e+01 85 | 1.7295614e+01 3.7429258e+01 7.2190048e+01 86 | 9.7974690e+01 2.4910272e+01 4.6558598e+01 87 | 2.7144726e+01 9.2487529e+01 3.1666667e+01 88 | 2.5232935e+01 6.2949929e+01 5.2368355e+01 89 | 8.7574190e+01 8.7830878e+01 1.4219763e+01 90 | 7.3730599e+01 6.4167443e+01 3.5269337e+01 91 | 1.3651874e+01 7.9839064e+01 3.8203065e+01 92 | 1.1756687e+00 4.3502604e+01 6.5427396e+01 93 | 8.9389797e+01 9.8114025e+01 1.1461856e+01 94 | 1.9913807e+01 9.5957798e+00 8.4704918e+01 95 | 2.9872301e+01 5.2748240e+01 5.7255716e+01 96 | 6.6144258e+01 5.4564582e+01 3.9727780e+01 97 | 2.8440859e+01 2.8434276e+01 7.9519290e+01 98 | 4.6922429e+01 3.7080266e+01 6.3666558e+01 99 | 6.4781123e+00 6.4692602e+00 8.4704918e+01 100 | 9.8833494e+01 5.4480906e+01 3.9776254e+01 101 | 5.8279168e+01 8.3637560e+01 1.9713346e+01 102 | 4.2349626e+01 1.4532199e+01 7.8177851e+01 103 | 5.1551175e+01 1.7152026e+01 7.1683474e+01 104 | 3.3395148e+01 6.8047182e+00 8.3113373e+01 105 | 4.3290660e+01 8.2401153e+01 2.8174460e+01 106 | 2.2594987e+01 1.3397076e+01 8.4704918e+01 107 | 5.7980687e+01 8.8478629e+01 1.4588930e+01 108 | 7.6036501e+01 5.1473740e+01 4.0686262e+01 109 | 5.2982312e+01 9.6363560e+01 1.7093722e+01 110 | 6.4052650e+01 1.2049467e+01 6.0019024e+01 111 | 2.0906940e+01 4.8289882e+00 8.4704918e+01 112 | 3.7981837e+01 3.8015200e+01 6.5801650e+01 113 | 7.8332865e+01 4.1279122e+01 5.0462022e+01 114 | 6.8084575e+01 4.0139130e+01 5.1115770e+01 115 | 4.6109513e+01 4.2099713e+01 5.8509570e+01 116 | 5.6782871e+01 3.7695369e+01 5.6524382e+01 117 | 7.9421065e+01 9.0733653e+01 1.2470662e+01 118 | 5.9182593e+00 6.7016214e+01 4.9663954e+01 119 | 6.0286909e+01 9.6183852e+01 1.1431956e+01 120 | 5.0268804e+00 1.6297934e+01 8.4704918e+01 121 | 4.1537486e+01 7.4864941e+01 3.3951390e+01 122 | 3.0499868e+01 3.7406572e+01 7.1711269e+01 123 | 8.7436717e+01 4.5423651e+01 4.6244858e+01 124 | 1.5009499e+00 3.8560696e+00 8.4704918e+01 125 | 7.6795039e+01 5.6243201e+01 3.8772909e+01 126 | 9.7084494e+01 3.7231215e+01 4.6419510e+01 127 | 9.9008259e+01 7.9278371e+01 2.2993912e+01 128 | 7.8886169e+01 7.9523097e+01 2.2771052e+01 129 | 4.3865853e+01 3.8291447e+01 6.3372005e+01 130 | 4.9831130e+01 2.5278980e+01 6.8082758e+01 131 | 2.1396333e+01 3.4292786e+01 7.5017715e+01 132 | 6.4349229e+01 9.6780449e+01 1.1825164e+01 133 | 3.2003558e+01 4.7980839e+01 5.8245772e+01 134 | 9.6009860e+01 3.6832756e+01 4.6394733e+01 135 | 7.2663177e+01 7.6456716e+01 2.5168567e+01 136 | 4.1195321e+01 3.7714897e+01 6.4775593e+01 137 | 7.4456578e+01 9.0030622e+01 1.2896016e+01 138 | 2.6794725e+01 1.8343205e+01 8.4704918e+01 139 | 4.3992431e+01 3.6831732e+01 6.4667270e+01 140 | 9.3338011e+01 9.1745704e+01 1.1405797e+01 141 | 6.8333232e+01 5.1591606e+01 4.1490798e+01 142 | 2.1255986e+01 9.0307262e+00 8.4704918e+01 143 | 8.3923824e+01 7.3531149e+01 2.8140581e+01 144 | 6.2878460e+01 4.7121623e-01 6.0828789e+01 145 | 1.3377275e+01 6.0312312e+01 5.3710033e+01 146 | 2.0713273e+01 9.5686666e+01 3.1666667e+01 147 | 6.0719894e+01 3.9743193e+01 5.1306328e+01 148 | 6.2988785e+01 7.3155079e+01 2.8510945e+01 149 | 3.7047683e+01 6.8463883e+01 4.3767173e+01 150 | 5.7514778e+01 9.7850302e+01 1.3581878e+01 151 | 4.5142483e+01 2.0378517e+01 7.5938040e+01 152 | 4.3895325e+00 5.9330284e+01 5.4169081e+01 153 | 2.7185123e+00 9.5156252e+01 3.1666667e+01 154 | 3.1268505e+01 2.6027241e+01 7.9936061e+01 155 | 1.2862575e+00 5.1467762e+01 5.7956609e+01 156 | 3.8396729e+01 6.3633190e+01 4.6858221e+01 157 | 6.8311597e+01 4.0095911e+01 5.1153813e+01 158 | 9.2842462e+00 4.8661131e+01 5.9795552e+01 159 | 3.5338324e+00 7.5045811e+01 4.1726227e+01 160 | 6.1239548e+01 1.2619673e+01 6.2146707e+01 161 | 6.0854036e+01 4.3062482e+00 6.2502915e+01 162 | 1.5759818e+00 3.7093934e+01 7.2514096e+01 163 | 1.6354934e+00 6.9330212e+01 4.7449790e+01 164 | 1.9007459e+01 9.3582494e+01 3.1666667e+01 165 | 5.8691847e+01 4.7757561e+01 4.5539587e+01 166 | 5.7581090e+00 1.2910010e+01 8.4704918e+01 167 | 3.6756804e+01 4.8383121e+01 5.4944335e+01 168 | 6.3145116e+01 9.4559716e+01 1.1705368e+01 169 | 7.1763442e+01 3.6774413e+01 5.3164820e+01 170 | 6.9266939e+01 3.2848557e+01 5.4843040e+01 171 | 8.4079061e+00 7.7287548e+01 3.9992701e+01 172 | 4.5435515e+01 2.9727402e+01 6.8580844e+01 173 | 4.4182830e+01 1.7785436e+01 7.7023546e+01 174 | 3.5325046e+01 6.9079916e+01 4.4090338e+01 175 | 1.5360636e+01 2.6394486e+01 8.0902470e+01 176 | 6.7564465e+01 4.5773906e+01 4.5739751e+01 177 | 6.9921333e+01 8.4369242e+01 1.8477694e+01 178 | 7.2750913e+01 8.8149866e+01 1.5575901e+01 179 | 4.7838438e+01 7.0001996e+01 3.6841233e+01 180 | 5.5484199e+01 7.5569099e+01 2.8259787e+01 181 | 1.2104711e+01 9.7451480e+01 3.1666667e+01 182 | 4.5075394e+01 4.0215268e+01 6.1031557e+01 183 | 7.1588295e+01 1.3127864e+01 5.6304657e+01 184 | 8.9284161e+01 7.2473389e+01 2.9157928e+01 185 | 2.7310247e+01 8.9951821e+01 3.1698288e+01 186 | 2.5476930e+01 1.7070131e+01 8.4704918e+01 187 | 8.6560348e+01 4.3028691e+00 4.9567642e+01 188 | 2.3235037e+01 4.7915922e+01 6.0391618e+01 189 | 8.0487174e+01 9.3936285e+00 5.2837288e+01 190 | 9.0839754e+01 6.5004983e+01 3.4236062e+01 191 | 2.3189432e+01 9.5227754e+01 3.1666667e+01 192 | 2.3931256e+01 4.5771270e+01 6.2436019e+01 193 | 4.9754484e+00 5.3688065e+01 5.6773040e+01 194 | 7.8384075e+00 6.6487146e+00 8.4704918e+01 195 | 6.4081541e+01 4.9387008e+01 4.3042624e+01 196 | 1.9088657e+01 4.1754097e+01 6.7613245e+01 197 | 8.4386950e+01 2.9225705e+01 5.1142177e+01 198 | 1.7390025e+01 2.8966394e+01 7.9145346e+01 199 | 1.7079281e+01 7.5384600e+01 4.1444755e+01 200 | 9.9429549e+01 9.6795712e+00 4.6666667e+01 201 | 4.3979086e+01 7.6917011e+00 7.7156449e+01 202 | 3.4004795e+01 7.2091503e+01 4.0461903e+01 203 | 3.1421731e+01 7.6491151e+01 3.9284487e+01 204 | 3.6507839e+01 6.5794492e+01 4.6397388e+01 205 | 3.9323955e+01 8.1040852e+01 3.0974916e+01 206 | 5.9152520e+01 3.7424309e+01 5.3772346e+01 207 | 1.1974662e+01 3.0623148e+01 7.7934702e+01 208 | 3.8128797e+00 3.7069960e+01 7.2536994e+01 209 | 4.5859795e+01 7.0674712e+01 3.6884355e+01 210 | 8.6986735e+01 1.6836629e+01 4.9271246e+01 211 | 9.3423652e+01 8.1372101e+01 2.1061439e+01 212 | 2.6444917e+01 4.6622832e+01 6.1549132e+01 213 | 1.6030034e+01 7.2228568e+01 4.4249412e+01 214 | 8.7285526e+01 9.9486891e+01 1.1663367e+01 215 | 2.3788031e+01 3.6250302e+01 7.3299031e+01 216 | 6.4583125e+01 7.3082814e+01 2.8579373e+01 217 | 9.6688742e+01 6.4966741e+01 3.4255189e+01 218 | 6.6493121e+01 6.8133908e+01 3.2730772e+01 219 | 8.7038103e+01 7.6119200e-01 4.9233552e+01 220 | 9.9273048e-01 6.5414930e+01 5.0861248e+01 221 | 1.3700989e+01 9.4523514e+01 3.1666667e+01 222 | 8.1875583e+01 6.1327104e+01 3.6084082e+01 223 | 4.3016605e+01 7.8292798e+01 3.0342174e+01 224 | 8.9032172e+01 3.1534871e-01 4.7603385e+01 225 | 7.3490821e+01 7.9695785e+01 2.2614578e+01 226 | 6.8732359e+01 6.4181666e+01 3.4758751e+01 227 | 3.4611197e+01 1.7847862e+01 8.2515798e+01 228 | 1.6603474e+01 5.2940073e+01 5.7156127e+01 229 | 1.5561258e+01 2.1874351e+01 8.3670976e+01 230 | 1.9111631e+01 5.4805244e+01 5.6233941e+01 231 | 4.2245153e+01 5.8237363e+00 7.8241020e+01 232 | 8.5597571e+01 5.8758710e+01 3.7414520e+01 233 | 4.9024999e+01 4.1610356e+01 5.8190772e+01 234 | 8.1593477e+01 1.8644524e+01 5.2343700e+01 235 | 4.6076983e+01 6.3910721e+00 7.5764517e+01 236 | 4.5735438e+01 7.4782778e+00 7.5994920e+01 237 | 4.5068888e+01 3.1003746e+01 6.8235999e+01 238 | 4.1221906e+01 9.4408492e+01 2.4603808e+01 239 | 9.0160982e+01 9.8072663e+01 1.1405797e+01 240 | 5.5839392e-01 5.5511549e+01 5.5904022e+01 241 | 2.9740568e+01 9.8852564e+01 3.1666667e+01 242 | 4.9162489e+00 6.9155990e+01 4.7645138e+01 243 | 6.9318045e+01 2.4166086e+01 5.7246974e+01 244 | 6.5010641e+01 8.0981368e+01 2.1432960e+01 245 | 9.8298778e+01 9.3451169e+01 1.1405797e+01 246 | 5.5267324e+01 1.2880349e+01 6.8422014e+01 247 | 4.0007352e+01 6.8682686e+01 4.1995544e+01 248 | 1.9878852e+01 2.9724493e+01 7.8593382e+01 249 | 6.2520102e+01 6.4722082e+01 3.4376966e+01 250 | 7.3336280e+01 4.6375881e+01 4.4706705e+01 251 | 3.7588548e+01 9.2278964e+01 2.6768247e+01 252 | 9.8764629e-01 2.4172191e+01 8.2311237e+01 253 | 4.1985781e+01 6.6015651e+01 4.3556943e+01 254 | 7.5366963e+01 3.3228698e+01 5.4757671e+01 255 | 7.9387177e+01 4.7675299e+01 4.3825623e+01 256 | 9.1995721e+01 4.6877328e+01 4.4977342e+01 257 | 8.4472150e+01 7.0592893e+01 3.1054104e+01 258 | 3.6775288e+01 2.3994937e+01 7.7391780e+01 259 | 6.2080133e+01 7.1720259e+01 2.9888797e+01 260 | 7.3127726e+01 8.6519670e+01 1.7563008e+01 261 | 1.9389318e+01 4.1098966e+01 6.8372759e+01 262 | 9.0481233e+01 4.2478717e+01 4.6635707e+01 263 | 5.6920575e+01 9.5428637e+01 1.4081094e+01 264 | 6.3178993e+01 8.8141861e+01 1.3893955e+01 265 | 2.3441296e+01 6.9858767e+01 4.6836189e+01 266 | 5.4878213e+01 3.0540114e+01 6.1261438e+01 267 | 9.3158335e+01 8.2932609e+01 1.9560541e+01 268 | 3.3519743e+01 9.7060457e+01 2.9278716e+01 269 | 6.5553106e+01 3.0010272e+01 5.6136633e+01 270 | 3.9190421e+01 9.9806225e+01 2.5810999e+01 271 | 6.2731479e+01 4.4074843e+01 4.7723832e+01 272 | 6.9908014e+01 6.2269037e-01 5.6992967e+01 273 | 3.9718395e+01 2.9190112e+01 7.2151260e+01 274 | 4.1362890e+01 6.9187848e+01 4.0772123e+01 275 | 6.5521295e+01 4.9284927e+01 4.3094665e+01 276 | 8.3758510e+01 8.3477633e+00 5.1271129e+01 277 | 3.7160803e+01 1.9578714e+01 8.1179854e+01 278 | 4.2525316e+01 9.7759475e+01 2.3828737e+01 279 | 5.9466337e+01 3.6619871e+01 5.3766294e+01 280 | 5.6573857e+01 1.3943238e+01 6.7142267e+01 281 | 7.1654240e+01 1.4755525e+00 5.6278433e+01 282 | 5.1131145e+01 6.4064119e+01 4.1599680e+01 283 | 7.7640121e+01 7.3772200e+01 2.7561093e+01 284 | 4.8934548e+01 2.6757302e+00 7.3724968e+01 285 | 1.8590445e+01 1.0215260e+01 8.4704918e+01 286 | 7.0063541e+01 8.9333022e+01 1.3443090e+01 287 | 9.8270880e+01 7.6387648e+01 2.5577793e+01 288 | 8.0663775e+01 5.8266454e+01 3.7673304e+01 289 | 7.0356766e+01 6.8543027e+01 3.2651164e+01 290 | 4.8496372e+01 9.6713351e+01 2.0145011e+01 291 | 1.1461282e+01 5.5034440e+01 5.6125386e+01 292 | 6.6485557e+01 7.7719685e+01 2.4392462e+01 293 | 3.6537389e+01 6.1035042e+01 4.9102771e+01 294 | 1.4004446e+01 9.8859338e+01 3.1666667e+01 295 | 5.6677280e+01 4.8262228e+00 6.7036206e+01 296 | 8.2300831e+01 9.8538908e+01 1.2167087e+01 297 | 6.7394863e+01 2.0473617e+01 5.8132982e+01 298 | 9.9944730e+01 9.1247718e+01 1.1405797e+01 299 | 9.6163641e+01 6.6554603e+01 3.3441301e+01 300 | 5.8862165e+00 4.6232141e+01 6.1931337e+01 301 | 3.6031117e+01 4.8333251e+00 8.1771235e+01 302 | 5.4851281e+01 4.6043917e+01 4.9718716e+01 303 | 2.6176957e+01 7.9995057e+01 3.8101326e+01 304 | 5.9734485e+01 2.8943312e+01 5.6961331e+01 305 | 4.9277997e+00 6.9510237e+01 4.7244399e+01 306 | 5.7105749e+01 2.5927894e+01 6.1430274e+01 307 | 7.0085723e+01 7.1322972e+01 3.0254575e+01 308 | 9.6228826e+01 7.2036969e+01 2.9577756e+01 309 | 7.5051823e+01 7.3327669e+01 2.7734698e+01 310 | 7.3999305e+01 6.2233077e+01 3.6199249e+01 311 | 4.3187339e+01 9.8977940e+01 2.3433482e+01 312 | 6.3426596e+01 1.5237784e+01 6.0441324e+01 313 | 8.0302634e+01 2.0332258e+01 5.2916754e+01 314 | 8.3881007e+00 8.1931658e+01 3.6818312e+01 315 | 9.4546279e+01 5.8435362e+00 4.6666667e+01 316 | 9.1594246e+01 5.3850678e+01 4.0144690e+01 317 | 6.0198742e+01 1.9015332e+01 6.3134785e+01 318 | 2.5356058e+01 5.9948078e+01 5.3882748e+01 319 | 8.7345081e+01 2.9225799e+01 4.9040099e+01 320 | 5.1340071e+01 9.1287717e+00 7.1852630e+01 321 | 7.3265065e+01 5.0676728e+01 4.1296180e+01 322 | 4.2222659e+01 8.8413233e+01 2.5096049e+01 323 | 9.6137000e+01 6.1556805e+01 3.5966894e+01 324 | 7.2059239e+00 4.6392112e+00 8.4704918e+01 325 | 5.5340797e+01 9.5192426e+01 1.5336347e+01 326 | 2.9198392e+01 1.6903040e+01 8.4704918e+01 327 | 8.5796351e+01 8.2667104e+01 1.9817887e+01 328 | 3.3575514e+01 6.1137687e+01 5.0780398e+01 329 | 6.8020385e+01 8.4729946e+01 1.7750942e+01 330 | 5.3444421e+00 1.1412313e+01 8.4704918e+01 331 | 3.5665554e+01 6.4921982e+01 4.7464172e+01 332 | 4.9830460e+01 1.1481505e+01 7.3047721e+01 333 | 4.3444054e+01 4.7341222e+01 5.3442680e+01 334 | 5.6245842e+01 6.8318105e+01 3.5697341e+01 335 | 6.1662113e+01 1.3329862e+01 6.1779334e+01 336 | 1.1333998e+01 4.6407820e+01 6.1757128e+01 337 | 8.9825174e+01 7.1250008e+00 4.6841497e+01 338 | 7.5455138e+01 5.8121844e+01 3.7811108e+01 339 | 7.9112320e+01 5.6597889e+01 3.8573198e+01 340 | 8.1495207e+01 2.5526221e+01 5.2388903e+01 341 | 6.7000386e+01 2.3849414e+01 5.8333734e+01 342 | 2.0087641e+01 1.5953779e+00 8.4704918e+01 343 | 2.7308816e+01 3.8474472e+01 7.1175797e+01 344 | 6.2623464e+01 7.5730018e+01 2.6164756e+01 345 | 5.3685169e+01 5.7516005e+01 4.3270891e+01 346 | 5.9504051e+00 4.0808550e+01 6.8703058e+01 347 | 8.8961759e+00 1.9570817e+01 8.4704918e+01 348 | 2.7130817e+01 5.1217433e+01 5.8099669e+01 349 | 4.0907232e+01 7.1334569e+01 3.8256019e+01 350 | 4.7404145e+01 8.6738555e+01 2.3162904e+01 351 | 9.0898935e+01 7.4180541e+01 2.7564551e+01 352 | 5.9624714e+01 9.9483254e+01 1.1744654e+01 353 | 3.2895530e+01 8.6674820e+01 3.1784840e+01 354 | 4.7819443e+01 4.8581276e+01 5.0918420e+01 355 | 5.9717078e+01 9.0330541e+01 1.1661392e+01 356 | 1.6144875e+01 2.0314485e+00 8.4704918e+01 357 | 8.2947425e+01 6.3678745e+01 3.4892188e+01 358 | 9.5612241e+01 9.4405571e+01 1.1405797e+01 359 | 5.9554800e+01 4.0780155e+00 6.3879845e+01 360 | 2.8748213e+00 2.8567164e+01 7.9427190e+01 361 | 8.1211782e+01 6.7725380e+01 3.3041780e+01 362 | 6.1011358e+01 5.8617832e+01 3.7487924e+01 363 | 7.0149260e+01 6.4969619e+00 5.6890136e+01 364 | 9.2196203e+00 8.7921185e+01 3.3022093e+01 365 | 4.2488914e+01 4.8790932e+01 5.2585628e+01 366 | 3.7557666e+01 8.9147557e+01 2.7344154e+01 367 | 1.6615408e+01 7.6229473e+01 4.0792403e+01 368 | 8.3315146e+01 6.5530482e+01 3.4024881e+01 369 | 8.3863970e+01 9.7148152e+01 1.2006412e+01 370 | 4.5161403e+01 1.7113911e+01 7.6374252e+01 371 | 9.5660138e+01 1.3596515e+01 4.6666667e+01 372 | 1.4715324e+01 7.5521067e+01 4.1339803e+01 373 | 8.6993293e+01 3.1321696e+01 4.9439331e+01 374 | 7.6943640e+01 4.6325242e+01 4.4790687e+01 375 | 4.4416162e+01 3.3943415e+01 6.6841949e+01 376 | 6.2062012e+01 9.6218324e-01 6.1457936e+01 377 | 9.5168928e+01 3.3380144e+01 4.6169407e+01 378 | 6.4000966e+01 2.4682326e+01 5.9072140e+01 379 | 2.4732763e+01 9.9406089e+01 3.1666667e+01 380 | 3.5270199e+01 9.0556697e+01 2.8175987e+01 381 | 1.8786048e+01 3.4976835e+01 7.4422355e+01 382 | 4.9064436e+01 2.7811548e+01 6.7076747e+01 383 | 4.0927433e+01 9.2923664e+00 7.9044914e+01 384 | 4.6352558e+01 2.4053028e+01 7.1521071e+01 385 | 6.1094355e+01 9.0164663e+01 1.1507493e+01 386 | 7.1168466e+00 3.2424592e+01 7.6540360e+01 387 | 3.1428029e+01 5.7270335e+01 5.3996298e+01 388 | 6.0838366e+01 1.8506508e+01 6.2517632e+01 389 | 1.7502018e+01 7.3791019e+01 4.2791346e+01 390 | 6.2102743e+01 1.1175640e+01 6.1425702e+01 391 | 2.4595993e+01 3.8375167e+01 7.1275120e+01 392 | 5.8735822e+01 8.6236466e+01 1.6761619e+01 393 | 5.0605345e+01 8.5708293e+01 2.1933921e+01 394 | 4.6477892e+01 8.1936366e+01 2.6714610e+01 395 | 5.4141893e+01 2.4569504e+01 6.5063311e+01 396 | 9.4232657e+01 8.9758832e+01 1.1732459e+01 397 | 3.4175909e+01 6.0412353e+01 5.0736427e+01 398 | 4.0180434e+01 1.3973137e+01 7.9485100e+01 399 | 3.0768794e+01 1.6130135e+01 8.4362946e+01 400 | 4.1156796e+01 8.8315285e+01 2.5784578e+01 401 | 2.8593923e+01 9.7858513e+01 3.1666667e+01 402 | 3.9412761e+01 6.0131758e+01 4.8092245e+01 403 | 5.0301449e+01 3.6180601e+01 6.3229911e+01 404 | 7.2197985e+01 2.3140380e+01 5.6064689e+01 405 | 3.0620855e+01 4.4973047e+01 6.2763916e+01 406 | 1.1216371e+01 6.4310149e+01 5.1577460e+01 407 | 4.4328996e+01 2.4521751e+01 7.2506333e+01 408 | 4.6676255e+01 4.6801362e+01 5.2741830e+01 409 | 1.4668875e+00 4.9743178e+01 5.9030652e+01 410 | 6.6405187e+01 7.4964949e+00 5.8642625e+01 411 | 7.2406171e+01 7.6659484e+01 2.5050082e+01 412 | 2.8163360e+01 4.5367238e+00 8.4704918e+01 413 | 2.6181868e+01 1.6511260e+01 8.4704918e+01 414 | 7.0847140e+01 7.7719862e+01 2.4392306e+01 415 | 7.8385902e+01 2.0834854e+01 5.3705607e+01 416 | 9.8615781e+01 2.5177620e+01 4.6547084e+01 417 | 4.7334271e+01 3.9652384e+01 6.0984768e+01 418 | 9.0281883e+01 4.8068782e+01 4.4020097e+01 419 | 4.5105876e+01 5.0929074e+01 5.0229974e+01 420 | 8.0451681e+01 6.2479654e+01 3.5557787e+01 421 | 8.2886448e+01 6.2554740e+01 3.5474138e+01 422 | 1.6627012e+01 9.9116675e+01 3.1666667e+01 423 | 3.9390601e+01 3.5922196e+01 6.7038517e+01 424 | 5.2075748e+01 2.7599113e+01 6.4945305e+01 425 | 7.1812397e+01 6.7811674e+01 3.3156590e+01 426 | 5.6918952e+01 5.0876268e+01 4.4760683e+01 427 | 4.6080617e+01 2.7685971e+01 6.9225322e+01 428 | 4.4530705e+01 5.7884080e+01 4.6938040e+01 429 | 8.7744606e+00 8.2283546e+01 3.6590120e+01 430 | 4.4348322e+01 9.4145447e+01 2.2732521e+01 431 | 3.6629985e+01 4.4431741e+01 5.9319681e+01 432 | 3.0253382e+01 4.2322912e+01 6.6664346e+01 433 | 8.5184470e+01 9.9619772e+01 1.1870968e+01 434 | 7.5947939e+01 6.1411812e+01 3.6541578e+01 435 | 9.4975928e+01 9.4406607e+01 1.1405797e+01 436 | 5.5793851e+01 9.1208182e+01 1.4978499e+01 437 | 1.4233016e+00 8.1497682e+01 3.7097772e+01 438 | 5.9617708e+01 6.8963693e+01 3.2724497e+01 439 | 8.1620571e+01 3.0865401e+01 5.2727842e+01 440 | 9.7709235e+01 5.5819653e+01 3.9011208e+01 441 | 2.2190808e+01 6.3675759e+01 5.1962183e+01 442 | 7.0368367e+01 7.6908112e+01 2.5116372e+01 443 | 5.2206092e+01 5.4031017e+00 7.1145045e+01 444 | 9.3289706e+01 1.1483134e+01 4.6666667e+01 445 | 7.1335444e+01 8.4599050e+01 1.8702737e+01 446 | 2.2803890e+01 1.7238331e+01 8.4704918e+01 447 | 4.4964210e+01 3.6982983e+00 7.6503397e+01 448 | 1.7219970e+01 3.1255450e+01 7.7460480e+01 449 | 9.6882014e+01 8.1728067e+01 2.0724440e+01 450 | 3.5571610e+01 2.3463670e+01 7.8479661e+01 451 | 4.9046828e+00 5.8744140e+01 5.4438740e+01 452 | 7.5533857e+01 9.2418432e+01 1.2897025e+01 453 | 8.9481276e+01 3.3004915e+01 4.6825083e+01 454 | 2.8614965e+01 2.0554091e+01 8.4409528e+01 455 | 2.5120055e+01 3.6448714e+01 7.3118205e+01 456 | 9.3273619e+01 9.7571471e+01 1.1405797e+01 457 | 1.3098247e+01 7.1689413e+01 4.4789553e+01 458 | 9.4081954e+01 6.4330970e+01 3.4570601e+01 459 | 7.0185317e+01 7.8256725e+01 2.3913166e+01 460 | 8.4767647e+01 4.6648183e+01 4.5060051e+01 461 | 2.0927164e+01 2.3227725e+01 8.2881510e+01 462 | 4.5509169e+01 3.1787897e+01 6.7641360e+01 463 | 8.1073725e+00 7.8879187e+01 3.8853860e+01 464 | 8.5112240e+01 6.3444276e+01 3.5011284e+01 465 | 5.6204868e+01 6.5978285e+01 3.7812481e+01 466 | 3.1929630e+01 5.3758345e+01 5.5134227e+01 467 | 3.7489926e+01 9.1921660e+01 2.6827644e+01 468 | 8.6779570e+01 7.8050604e+01 2.4100200e+01 469 | 3.7217624e+01 3.2670948e+01 7.0838888e+01 470 | 7.3690056e+00 7.3874777e+01 4.2717419e+01 471 | 1.9983800e+01 4.3773386e+01 6.5062836e+01 472 | 4.9493280e+00 5.9179652e+01 5.4238572e+01 473 | 5.6670978e+01 1.1450921e+01 6.7042692e+01 474 | 1.2192475e+01 3.1916564e+01 7.6946693e+01 475 | 5.2211176e+01 6.2185335e+01 4.2155703e+01 476 | 1.1706015e+01 8.9455368e+01 3.2019625e+01 477 | 7.6991848e+01 9.6358606e+01 1.2734082e+01 478 | 3.7505580e+01 2.0063477e+00 8.0995113e+01 479 | 8.2338720e+01 1.1065185e+01 5.1996277e+01 480 | 4.6636146e+00 4.0302005e+01 6.9260478e+01 481 | 5.9791326e+01 9.7195066e+00 6.3592162e+01 482 | 9.4915039e+01 2.9304897e+01 4.6326340e+01 483 | 2.8879765e+01 6.7870762e+01 4.8926229e+01 484 | 8.8883261e+01 9.7979167e+01 1.1509628e+01 485 | 1.0158548e+01 3.9943359e+01 6.9644275e+01 486 | 6.5314507e+00 8.2088429e+01 3.6716930e+01 487 | 2.3429973e+01 1.3161932e+01 8.4704918e+01 488 | 9.3309842e+01 8.4489117e+01 1.7975573e+01 489 | 6.3127896e+00 2.3272666e+01 8.2855165e+01 490 | 2.6421766e+01 6.7154611e+00 8.4704918e+01 491 | 9.9953167e+01 3.3145213e+01 4.6154330e+01 492 | 2.1198796e+01 5.7523452e+01 5.4989446e+01 493 | 4.9840980e+01 1.3681927e+01 7.3039639e+01 494 | 2.9048830e+01 8.6779769e+01 3.3736713e+01 495 | 6.7275441e+01 3.2926621e+01 5.4807857e+01 496 | 9.5799112e+01 4.8800189e+01 4.3472010e+01 497 | 7.6655153e+01 4.3153673e+01 4.8699115e+01 498 | 6.6612374e+01 2.6054157e+01 5.8198732e+01 499 | 1.3094482e+01 9.8300281e+01 3.1666667e+01 500 | 9.5413016e+00 9.6569796e+01 3.1666667e+01 501 | 1.4864337e+00 9.4851732e+01 3.1666667e+01 502 | 2.8819335e+01 4.5172239e+01 6.3126917e+01 503 | 8.1673121e+01 3.3169299e+01 5.2861844e+01 504 | 9.8548351e+01 7.7594660e-01 4.6666667e+01 505 | 1.7362693e+00 1.6583996e+01 8.4704918e+01 506 | 8.1939293e+01 8.2816690e+01 1.9672790e+01 507 | 6.2113871e+01 6.4340074e+01 3.4566108e+01 508 | 5.6022204e+01 3.2227517e+01 5.9484310e+01 509 | 2.4403153e+01 2.6369566e+00 8.4704918e+01 510 | 8.2200759e+01 3.5544292e+01 5.2297363e+01 511 | 2.6321193e+01 7.4388453e+01 4.2275240e+01 512 | 7.5363453e+01 2.9866381e+01 5.4863622e+01 513 | 6.5964480e+01 1.8122317e+01 5.8877011e+01 514 | 2.1406286e+01 4.1519170e+01 6.7888795e+01 515 | 6.0211691e+01 8.6734000e+01 1.5518491e+01 516 | 6.0493711e+01 6.2493985e+01 3.5505539e+01 517 | 6.5950155e+01 5.5202289e+00 5.8885033e+01 518 | 1.8336363e+01 4.0409289e+01 6.9144347e+01 519 | 6.3654691e+01 3.0196018e+01 5.6050275e+01 520 | 1.7030911e+01 1.5231972e+01 8.4704918e+01 521 | 5.3960111e+01 3.0916820e+01 6.1929200e+01 522 | 6.2339418e+01 3.2582914e-01 6.1240194e+01 523 | 6.8588997e+01 4.3740886e+01 4.8023720e+01 524 | 6.7734595e+01 6.7641130e+01 3.3038692e+01 525 | 8.7683002e+01 8.2291300e+01 2.0183651e+01 526 | 1.2890500e+00 7.5584534e+01 4.1291207e+01 527 | 3.1040223e+01 1.6263890e+01 8.4240680e+01 528 | 7.7907925e+01 5.5204308e+01 3.9360440e+01 529 | 3.0729608e+01 5.2509370e+01 5.6739533e+01 530 | 9.2667831e+01 9.1935528e+01 1.1405797e+01 531 | 6.7871988e+01 4.4190695e+01 4.7501340e+01 532 | 7.4321493e+00 4.4802340e+00 8.4704918e+01 533 | 7.0669191e+00 9.6458349e+01 3.1666667e+01 534 | 1.1930467e+00 1.3462415e+00 8.4704918e+01 535 | 2.2715372e+01 5.5202350e+01 5.6047335e+01 536 | 5.1625200e+01 9.3429963e+01 1.8051520e+01 537 | 4.5820422e+01 8.9860886e+01 2.1930970e+01 538 | 7.0320334e+01 6.1798972e+01 3.5896458e+01 539 | 5.8248388e+01 6.9992451e+01 3.2432463e+01 540 | 5.0920600e+01 9.3909501e+01 1.8542524e+01 541 | 7.4289609e+00 4.5208415e+01 6.3084016e+01 542 | 1.9323631e+01 1.7667178e+01 8.4704918e+01 543 | 3.7960413e+01 6.1676520e+01 4.8072447e+01 544 | 2.7643472e+01 5.1838015e+01 5.7749153e+01 545 | 7.7088184e+01 3.6449306e+01 5.3441232e+01 546 | 3.1392999e+01 7.7330971e+01 3.8726885e+01 547 | 6.3819322e+01 8.2827699e+01 1.9662122e+01 548 | 9.8656686e+01 3.1839010e+01 4.6155353e+01 549 | 5.0287580e+01 5.9597957e+01 4.4152407e+01 550 | 9.4770338e+01 7.8181805e+01 2.3981007e+01 551 | 8.2802584e+01 3.3592350e+00 5.1766925e+01 552 | 9.1755720e+01 8.5697746e+01 1.6683098e+01 553 | 1.1307983e+01 6.8261099e+01 4.8561598e+01 554 | 8.1212591e+01 8.0185059e+01 2.2167868e+01 555 | 9.0826256e+01 9.1769708e+01 1.1405797e+01 556 | 1.5637612e+01 3.8810989e+01 7.0835110e+01 557 | 1.2211877e+01 4.7198094e+01 6.1010660e+01 558 | 7.6266647e+01 8.8058340e+00 5.4524003e+01 559 | 7.2180028e+01 9.2510541e+01 1.2646370e+01 560 | 6.5163982e+01 6.7847986e+01 3.2843257e+01 561 | 7.5402267e+01 6.4103233e+01 3.5425074e+01 562 | 6.6316201e+01 9.9590779e+01 1.2024096e+01 563 | 8.8349350e+01 4.9954242e+01 4.2639627e+01 564 | 2.7215744e+01 4.3005161e+01 6.6074175e+01 565 | 4.1943272e+01 8.2916860e+01 2.8618187e+01 566 | 2.1299366e+01 1.1669606e+01 8.4704918e+01 567 | 3.5599967e+00 5.9868431e+01 5.3919783e+01 568 | 8.1163704e+00 2.2122456e+01 8.3525763e+01 569 | 8.5056678e+01 3.9867688e+01 5.0555762e+01 570 | 3.4020345e+01 3.0115234e+01 7.4854899e+01 571 | 4.6615498e+01 6.3354396e+01 4.3605900e+01 572 | 9.1376324e+01 9.4498331e+01 1.1405797e+01 573 | 2.2857671e+01 5.8708086e-01 8.4704918e+01 574 | 8.6204490e+01 8.1659885e+01 2.0788828e+01 575 | 6.5661854e+01 6.9088527e+01 3.2199345e+01 576 | 8.9118280e+01 9.8098479e+01 1.1487321e+01 577 | 4.8814352e+01 6.9739644e+00 7.3813847e+01 578 | 9.9264565e+01 4.4954753e+00 4.6666667e+01 579 | 3.7332594e+01 7.3995374e+01 3.6461151e+01 580 | 5.3137832e+01 8.1912169e+01 2.3779484e+01 581 | 1.8131633e+01 2.6084057e+01 8.1105071e+01 582 | 5.0194434e+01 7.0401274e+01 3.5370946e+01 583 | 4.2219483e+01 2.9647567e+01 7.0616748e+01 584 | 6.6042740e+01 8.2291002e+00 5.8834350e+01 585 | 6.7365301e+01 8.7538362e+01 1.5194178e+01 586 | 9.5733018e+01 7.7451651e+00 4.6666667e+01 587 | 1.9186575e+01 7.4098431e+01 4.2522770e+01 588 | 1.1121644e+01 1.2507013e+01 8.4704918e+01 589 | 5.6505387e+01 4.4371293e+01 5.0819105e+01 590 | 9.6916627e+01 5.9248312e+01 3.7161631e+01 591 | 2.3743871e+00 6.3634804e+01 5.1985402e+01 592 | 8.7021582e+01 5.3273484e+01 4.0483869e+01 593 | 2.6876593e+00 2.0871653e+01 8.4238076e+01 594 | 5.1952869e+01 6.7372807e+01 3.8362760e+01 595 | 1.9229142e+01 2.4190850e+01 8.2299587e+01 596 | 7.1568905e+01 7.2052936e+01 2.9398148e+01 597 | 2.5067278e+01 3.9996405e+01 6.9585971e+01 598 | 9.3386482e+01 3.9403595e+01 4.6526875e+01 599 | 1.3718931e+01 4.1150225e+01 6.8313620e+01 600 | 5.2162234e+01 1.4974372e+01 7.1181762e+01 601 | 8.9520169e+01 8.7823288e+01 1.4228817e+01 602 | 9.4238725e+01 2.1755794e+00 4.6666667e+01 603 | 3.3508338e+01 9.2383268e+01 2.9285987e+01 604 | 4.3736382e+01 6.3261736e+01 4.4742691e+01 605 | 4.7115591e+01 6.6915789e+00 7.5043127e+01 606 | 1.4931034e+01 6.3267259e+01 5.2192159e+01 607 | 1.3586439e+01 7.5374407e+01 4.1452619e+01 608 | 5.3249823e+01 7.6966282e+01 2.7976136e+01 609 | 7.2578931e+01 8.0803605e+01 2.1595677e+01 610 | 3.9870305e+01 5.4333387e+01 4.9964080e+01 611 | 3.5841852e+01 4.8508409e+01 5.5208327e+01 612 | 2.8527941e+01 4.4121926e+01 6.4593386e+01 613 | 8.6863524e+01 6.2649857e+01 3.5424668e+01 614 | 6.2641267e+01 7.7783158e+00 6.1007953e+01 615 | 2.4117231e+01 5.4406284e+01 5.6424626e+01 616 | 9.7808165e+01 2.0909703e+01 4.6658561e+01 617 | 6.4050078e+01 2.6999867e+01 5.7659379e+01 618 | 2.2984865e+01 2.9168146e+01 7.9000215e+01 619 | 6.8133515e+01 8.2222057e+01 2.0251237e+01 620 | 6.6582341e+01 4.1149818e+01 5.0374105e+01 621 | 1.3471797e+01 5.2695564e+01 5.7283160e+01 622 | 2.2493293e+00 9.2020805e+01 3.1666667e+01 623 | 2.6219945e+01 3.7913563e+01 7.1727667e+01 624 | 1.1651516e+01 6.3889879e+01 5.1835308e+01 625 | 6.9318238e+00 1.7373889e+01 8.4704918e+01 626 | 8.5293050e+01 7.8580018e+01 2.3622247e+01 627 | 1.8033067e+01 3.6563105e+01 7.3012915e+01 628 | 3.2418564e+00 7.7694198e+01 3.9697034e+01 629 | 7.3392626e+01 3.4214632e+01 5.4284066e+01 630 | 5.3651682e+01 7.7417596e+01 2.7431994e+01 631 | 2.7602966e+01 1.4783221e+01 8.4704918e+01 632 | 3.6845815e+01 1.4824230e+01 8.1346839e+01 633 | 1.2886306e+00 6.3905162e+01 5.1826021e+01 634 | 8.8920608e+01 9.3372996e+00 4.7706657e+01 635 | 8.6602060e+01 9.2878840e+01 1.1730478e+01 636 | 2.5424693e+01 4.8513584e+01 5.9911139e+01 637 | 5.6948060e+01 1.6324513e+01 6.6754656e+01 638 | 1.5926482e+01 2.7634206e+01 8.0062989e+01 639 | 5.9436442e+01 1.3097372e+01 6.4021586e+01 640 | 3.3110008e+01 2.3220097e+00 8.3250212e+01 641 | 6.5861265e+01 2.3129737e+01 5.8934934e+01 642 | 8.6363422e+01 8.4525855e+01 1.7937000e+01 643 | 5.6762331e+01 7.2635615e+01 3.0399414e+01 644 | 9.8048127e+01 6.9468779e+01 3.1942918e+01 645 | 7.9183160e+01 3.8310627e+01 5.2349230e+01 646 | 1.5259362e+01 4.7984251e+01 6.0335665e+01 647 | 8.3302723e+01 9.6707892e+01 1.2062192e+01 648 | 1.9186326e+01 7.8353604e+01 3.9225110e+01 649 | 6.3898657e+01 4.0973602e+01 5.0471234e+01 650 | 6.6900008e+01 9.5736517e+01 1.2082852e+01 651 | 7.7208780e+01 1.9697929e+01 5.4164294e+01 652 | 3.7981775e+01 5.2934481e+01 5.1424934e+01 653 | 4.4158549e+01 5.0419282e+01 5.0861085e+01 654 | 4.8305999e+01 4.8340677e+01 5.0907307e+01 655 | 6.0810566e+01 3.7761358e+01 5.2472061e+01 656 | 1.7599564e+01 5.1971965e+01 5.7674817e+01 657 | 2.0255610e-01 8.1576890e+01 3.7046719e+01 658 | 7.9022400e+01 2.0862876e+01 5.3451098e+01 659 | 5.1360850e+01 3.8879508e+01 6.0758340e+01 660 | 2.1322938e+01 4.6142682e+00 8.4704918e+01 661 | 1.0344980e+01 3.0480456e+01 7.8039741e+01 662 | 1.5733667e+01 8.1383942e+01 3.7171118e+01 663 | 4.0751498e+01 6.8209397e+01 4.2129151e+01 664 | 4.0775702e+01 8.8243724e+01 2.6057064e+01 665 | 5.2692688e+00 8.1798941e+00 8.4704918e+01 666 | 9.4181515e+01 4.9482566e+01 4.2973919e+01 667 | 1.4997168e+01 4.3033078e+01 6.6038700e+01 668 | 3.8437405e+01 3.4545758e+01 6.8669836e+01 669 | 3.1105856e+01 9.1365962e+01 3.0880544e+01 670 | 1.6853444e+01 1.6017165e+01 8.4704918e+01 671 | 8.9664815e+01 3.8786915e+01 4.6856372e+01 672 | 3.2272443e+01 9.6721666e+01 3.0094223e+01 673 | 7.3399632e+01 6.6724690e+00 5.5602281e+01 674 | 4.1090418e+01 3.1672763e+01 6.9729025e+01 675 | 3.9979385e+01 1.2672360e+01 7.9600721e+01 676 | 5.0552221e+01 1.1580013e+01 7.2482599e+01 677 | 1.6930586e+01 1.6435755e+01 8.4704918e+01 678 | 5.2474549e+01 9.3947800e+00 7.0918165e+01 679 | 6.4120266e+01 5.3213249e+01 4.0521813e+01 680 | 1.6197484e+00 7.6240446e+01 4.0783645e+01 681 | 8.3685156e+01 4.1749569e+01 4.9898460e+01 682 | 8.0346219e+01 8.3552963e+01 1.8936610e+01 683 | 6.9778483e+01 8.0472910e+01 2.1900487e+01 684 | 4.6188778e+01 9.1711659e-01 7.5688321e+01 685 | 8.2612618e+00 6.4471331e+01 5.1477197e+01 686 | 8.2071701e+01 1.1235277e+01 5.2121704e+01 687 | 1.9302002e+01 2.1570199e+01 8.3847543e+01 688 | 4.4535473e+01 9.0928716e+01 2.2619523e+01 689 | 1.2957830e+00 1.4467848e+01 8.4704918e+01 690 | 3.0874180e+01 2.0747787e+01 8.3475029e+01 691 | 8.7535098e+01 8.5064079e+01 1.7374739e+01 692 | 8.3525940e+01 7.1310907e+01 3.0297580e+01 693 | 3.3309507e+01 8.0424879e+00 8.3154584e+01 694 | 8.8070533e+01 8.1869909e+01 2.0590733e+01 695 | 4.7968681e+01 3.4895878e+01 6.5258284e+01 696 | 5.6081673e+01 1.6254734e+01 6.7636176e+01 697 | 6.1590866e+01 5.3975099e+01 4.0071482e+01 698 | 6.6189901e+01 9.2332697e+01 1.2011678e+01 699 | 6.1663323e+01 4.3712357e+01 4.8124279e+01 700 | 6.8514000e+01 5.4012537e+01 4.0049500e+01 701 | 5.1015303e+01 6.9835335e+01 3.5725708e+01 702 | 7.1396084e+01 2.0543851e-01 5.6381258e+01 703 | 5.1520790e+01 8.3660328e+01 2.2936773e+01 704 | 6.0586579e+01 8.8942373e+01 1.2823785e+01 705 | 9.6670263e+01 1.9751060e+00 4.6666667e+01 706 | 8.2211740e+01 9.8419952e+00 5.2056056e+01 707 | 3.1775068e+01 3.7415558e+01 7.0510011e+01 708 | 5.8769677e+01 9.6747892e+01 1.2511224e+01 709 | 1.3020167e+01 6.1958534e+01 5.2896288e+01 710 | 2.5435426e+01 6.7003835e+01 4.9674063e+01 711 | 8.0303090e+01 4.5616918e+01 4.5771956e+01 712 | 6.6784589e+01 8.3803533e+01 1.8685898e+01 713 | 1.3626353e+00 8.2309807e+01 3.6573042e+01 714 | 5.6157937e+01 5.4211211e+01 4.3321402e+01 715 | 4.5456094e+01 9.2391182e+00 7.6180737e+01 716 | 9.0494922e+01 2.9527639e+01 4.6313533e+01 717 | 2.8215885e+01 6.0223769e+01 5.3752244e+01 718 | 6.5034354e+00 1.8283858e+01 8.4704918e+01 719 | 4.7659189e+01 7.3317025e+01 3.3293270e+01 720 | 9.8371192e+01 5.4889198e+01 3.9540699e+01 721 | 9.2234958e+01 1.5616039e+01 4.6666667e+01 722 | 5.6119625e+01 9.2507026e+01 1.4717325e+01 723 | 6.5232469e+01 2.0215511e+01 5.9294077e+01 724 | 7.7267960e+01 8.4485608e-01 5.4141513e+01 725 | 1.0617579e+01 6.8911142e+01 4.7914153e+01 726 | 1.0733656e-01 4.0096769e+01 6.9479838e+01 727 | 5.4176379e+01 3.7958292e+01 5.9235793e+01 728 | 6.8577917e-01 9.0318605e+01 3.1666667e+01 729 | 4.5133767e+01 9.4335044e+01 2.2257305e+01 730 | 1.9566205e+01 4.7397950e+01 6.0829478e+01 731 | 7.8714313e+01 1.7760485e+00 5.3574632e+01 732 | 6.1856262e+01 8.1995453e+01 2.0472663e+01 733 | 1.5520957e+00 5.7388459e+00 8.4704918e+01 734 | 8.9085396e+01 9.0127967e+00 4.7553787e+01 735 | 7.6170319e+01 6.9665460e+01 3.2125739e+01 736 | 9.0703504e+01 1.4714915e+01 4.6666667e+01 737 | 7.5856860e+01 5.7578770e+00 5.4678218e+01 738 | 3.8072994e+01 6.3357737e+00 8.0679859e+01 739 | 3.3111079e+01 7.2282963e+01 4.0797434e+01 740 | 5.0407844e+01 3.3708240e+00 7.2597400e+01 741 | 5.6456859e+01 6.9571751e+01 3.3858406e+01 742 | 7.6719736e+01 2.2117649e+01 5.4352035e+01 743 | 7.7986778e+01 6.2538607e+01 3.5794846e+01 744 | 4.8409788e+01 5.1329271e+01 4.8865302e+01 745 | 8.0221322e+01 5.7570811e+01 3.8058747e+01 746 | 4.7101215e+01 2.8724391e+01 6.7965013e+01 747 | 2.0275890e+01 8.9268470e+01 3.2138510e+01 748 | 5.7961489e+01 9.2592703e+00 6.5693000e+01 749 | 6.6650026e+01 2.9248458e+01 5.6500488e+01 750 | 6.7676529e+01 8.2189861e+01 2.0282684e+01 751 | 9.4251124e+01 9.9401909e+01 1.1405797e+01 752 | 7.7014853e+01 6.7816045e+00 5.4238852e+01 753 | 7.3740432e+01 9.7308533e+01 1.2817840e+01 754 | 8.6626227e+01 9.2278756e+01 1.1728063e+01 755 | 9.9094832e+01 9.5873119e+01 1.1405797e+01 756 | 5.0392760e+01 5.6316367e+01 4.5520338e+01 757 | 6.2908555e+01 9.5052530e+01 1.1682178e+01 758 | 7.9261032e+01 3.1822406e+01 5.3786405e+01 759 | 4.4864921e+01 2.6589708e+01 7.0685483e+01 760 | 5.2435711e+01 6.1084222e+00 7.0951216e+01 761 | 1.7147322e+01 3.3276783e+01 7.5862663e+01 762 | 1.3066575e+01 2.9242284e+01 7.8946566e+01 763 | 2.1878112e+01 4.0248467e+01 6.9318053e+01 764 | 1.0548050e+01 3.4112300e+00 8.4704918e+01 765 | 1.4142585e+01 2.8746889e+01 7.9301798e+01 766 | 4.5696830e+01 2.1962134e+01 7.3856433e+01 767 | 7.8813305e+01 5.6592787e+01 3.8576062e+01 768 | 2.8106398e+01 8.7009289e+01 3.3586942e+01 769 | 2.2478673e+01 2.5498648e+01 8.1476869e+01 770 | 9.0887473e+01 5.9181033e+01 3.7196352e+01 771 | 7.3288452e-01 5.2269269e+01 5.7511165e+01 772 | 5.8873933e+01 1.2914619e+01 6.4675814e+01 773 | 5.4211787e+01 3.7760137e-01 6.9395065e+01 774 | 6.5352398e+01 3.2581647e+01 5.4963253e+01 775 | 3.1343498e+01 3.6076282e+01 7.2149447e+01 776 | 2.3115882e+01 9.9403474e+01 3.1666667e+01 777 | 4.1606383e+01 9.3996293e+01 2.4376665e+01 778 | 2.9879879e+01 4.3413808e+01 6.5545169e+01 779 | 6.7243639e+01 9.3550529e+01 1.2118517e+01 780 | 9.3825748e+01 4.9683294e+01 4.2830680e+01 781 | 3.4314769e+01 9.7107097e+01 2.8775059e+01 782 | 5.6296257e+01 9.5767394e+01 1.4577268e+01 783 | 1.1888856e+01 7.2072586e+01 4.4409571e+01 784 | 1.6902126e+01 6.4796353e+01 5.1272655e+01 785 | 2.7889542e+01 8.6260004e+01 3.4072629e+01 786 | 5.5681466e+01 3.0909188e+00 6.8025059e+01 787 | 4.8558916e+01 3.6587797e+01 6.3728971e+01 788 | 9.5222323e+01 9.3820534e+00 4.6666667e+01 789 | 2.3192084e+01 3.3464995e+01 7.5709341e+01 790 | 4.7865839e+01 7.3275317e-01 7.4500806e+01 791 | 5.2652240e+01 8.1552637e+01 2.4300108e+01 792 | 7.9272079e+01 2.5009804e+00 5.3350509e+01 793 | 1.9300765e+01 4.2420315e+01 6.6800458e+01 794 | 9.0960045e+01 3.3802001e+00 4.6666667e+01 795 | 9.2219639e+01 6.7670340e+01 3.2883396e+01 796 | 1.3266366e+00 3.2795739e+01 7.6247485e+01 797 | 7.6754963e+01 5.6006752e+01 3.8898131e+01 798 | 9.4734264e+01 4.2480712e+01 4.6635768e+01 799 | 8.1330552e+01 1.5010103e+01 5.2464331e+01 800 | 9.2382979e+01 6.4363273e+00 4.6666667e+01 801 | 1.9899726e+01 6.1644487e+01 5.3057661e+01 802 | 6.7427164e+01 6.2900584e+01 3.5293987e+01 803 | 9.2710309e+01 1.7663819e+01 4.6666667e+01 804 | 3.4381659e+01 4.0791710e+01 6.5032168e+01 805 | 5.9449294e+01 7.0613928e+01 3.1246328e+01 806 | 6.1548700e+01 4.2979022e+01 4.8826276e+01 807 | 3.3740749e-01 2.1093225e+01 8.4117505e+01 808 | 9.8201257e+01 5.9098997e+01 3.7238701e+01 809 | 8.9951309e+01 8.3720285e+01 1.8769134e+01 810 | 6.9275735e+01 8.8828782e+01 1.4021111e+01 811 | 4.3965368e+01 8.8560405e+01 2.3964270e+01 812 | 7.0102291e+01 9.6290796e+01 1.2421966e+01 813 | 6.0971499e+01 7.6963249e+01 2.5068414e+01 814 | 2.9988566e+01 3.6794262e+01 7.2797787e+01 815 | 8.5603719e+01 6.8135384e+00 5.0206347e+01 816 | 1.1207217e+01 1.0889649e+01 8.4704918e+01 817 | 2.9156041e+01 9.3682163e+01 3.1666667e+01 818 | 9.7446728e+00 5.1105547e+01 5.8167470e+01 819 | 3.9744797e+01 2.1127778e+01 7.8445258e+01 820 | 3.3331265e+01 4.2110506e+01 6.4262690e+01 821 | 9.4423471e+01 8.2953865e+01 1.9539976e+01 822 | 8.3855545e+01 1.4246931e+01 5.1219736e+01 823 | 2.5842740e+01 3.2163216e+01 7.6750693e+01 824 | 4.2898125e+00 8.1790876e+01 3.6908900e+01 825 | 5.8847898e-01 2.9338345e+01 7.8876796e+01 826 | 5.7441797e+01 7.9951482e+00 6.6246888e+01 827 | 7.4390195e+01 9.2830874e+01 1.2889041e+01 828 | 8.0683078e+01 1.6677465e+01 5.2752539e+01 829 | 6.3757064e+01 3.8677261e+01 5.1961331e+01 830 | 2.5127131e+01 4.8601078e+01 5.9842455e+01 831 | 1.4432045e+01 8.1087399e+01 3.7362548e+01 832 | 6.5155113e+01 4.0570801e+01 5.0753706e+01 833 | 9.4608693e+01 7.9502716e+01 2.2789567e+01 834 | 8.1588680e+01 1.9377034e+00 5.2345910e+01 835 | 9.3024707e+01 9.5665662e+01 1.1405797e+01 836 | 3.0994136e+01 8.5491577e+01 3.3823405e+01 837 | 2.6881711e+01 9.8631368e+01 3.1666667e+01 838 | 5.3645104e+01 2.5069681e+01 6.5141739e+01 839 | 1.6327830e+01 4.8251490e+01 6.0119385e+01 840 | 2.1098802e+01 3.2461248e+01 7.6510643e+01 841 | 2.1681209e+01 5.7401704e+00 8.4704918e+01 842 | 6.5178983e+01 2.9096834e+01 5.6573598e+01 843 | 5.2776186e+00 6.7607539e+01 4.9165585e+01 844 | 2.2929028e+01 9.5215246e+01 3.1666667e+01 845 | 6.6743213e+01 4.0272700e+00 5.8466304e+01 846 | 3.1093368e+01 8.2161657e+01 3.5822056e+01 847 | 3.0663286e+01 2.2362011e+01 8.2750375e+01 848 | 7.2067988e+01 9.9969725e+01 1.2635029e+01 849 | 9.5440651e+01 2.6052565e+01 4.6504481e+01 850 | 1.3113839e+01 2.3028285e+01 8.2997951e+01 851 | 6.8276809e+00 5.2508905e+01 5.7380748e+01 852 | 1.2522727e+01 5.6067296e+01 5.5647777e+01 853 | 1.6615342e+01 8.2602993e+01 3.6382232e+01 854 | 9.1141746e+01 2.8846037e+01 4.6352119e+01 855 | 1.3626027e+01 2.5271187e+01 8.1619155e+01 856 | 6.1699542e+01 2.4024804e+01 5.9529897e+01 857 | 2.6898165e+01 5.5149203e+01 5.6072023e+01 858 | 2.2066403e+01 2.1533689e+01 8.3868631e+01 859 | 7.1290102e+01 6.6549314e+01 3.3804252e+01 860 | 5.4899644e+01 3.0886419e+01 6.1097984e+01 861 | 9.4134842e+01 4.6977860e+01 4.4896466e+01 862 | 3.2986478e+01 5.0580441e+01 5.5837874e+01 863 | 7.0448630e+01 6.8838660e+01 3.2484445e+01 864 | 9.4342546e+01 1.9286504e+01 4.6666667e+01 865 | 5.8159434e+01 2.7356542e+01 5.9525495e+01 866 | 8.8015418e+01 9.2632676e+01 1.1594210e+01 867 | 7.4961164e+01 2.3474086e+01 5.5014564e+01 868 | 3.7961734e+01 1.2798187e+01 8.0742121e+01 869 | 7.2556128e+01 4.1261782e+01 5.0535788e+01 870 | 1.6279820e+01 6.3472160e+01 5.2077253e+01 871 | 9.5620461e+01 1.8154521e+01 4.6666667e+01 872 | 1.9622883e+01 4.0323122e+01 6.9237700e+01 873 | 7.7619251e+01 6.8876349e+01 3.2548378e+01 874 | 6.1329572e+01 3.2589296e+01 5.4959809e+01 875 | 1.6228023e+01 9.2328432e+01 3.1666667e+01 876 | 3.1054053e+00 7.5713401e+01 4.1192950e+01 877 | 2.8862882e+01 4.0111255e+01 6.9464474e+01 878 | 9.7106428e+01 1.9610905e+01 4.6666667e+01 879 | 9.5049934e+01 4.0027549e+01 4.6556491e+01 880 | 2.2804781e+01 1.5447530e+01 8.4704918e+01 881 | 9.5852608e+01 6.4571303e+00 4.6666667e+01 882 | 6.7985826e+01 1.2034604e+01 5.7851413e+01 883 | 5.4969208e+00 2.9341636e+00 8.4704918e+01 884 | 5.9984132e+01 8.6518759e+01 1.5772259e+01 885 | 3.9314599e+01 4.1419778e+01 6.1772697e+01 886 | 2.1536619e+01 7.9193160e+01 3.8633014e+01 887 | 1.8239962e+01 8.1639726e+01 3.7006234e+01 888 | 7.6754024e+00 3.9531626e+01 7.0088944e+01 889 | 7.4236960e-01 8.2594564e+01 3.6387721e+01 890 | 7.8878300e+01 3.3762329e+01 5.3793614e+01 891 | 1.7787630e+00 1.9735456e+01 8.4704918e+01 892 | 8.7794147e+01 5.1007079e+01 4.1925500e+01 893 | 3.5254177e+01 2.0988789e+01 8.1056298e+01 894 | 7.2213977e+01 5.7998466e+01 3.7821530e+01 895 | 9.6845084e+01 9.7921349e+01 1.1405797e+01 896 | 1.5566798e+01 4.6712232e+01 6.1463749e+01 897 | 1.6295554e+01 8.0211830e+01 3.7951046e+01 898 | 3.1339737e+01 4.3294827e+01 6.4397069e+01 899 | 2.9381548e+00 2.4118275e+01 8.2344862e+01 900 | 3.5762512e+01 6.3462401e+01 4.8286683e+01 901 | 2.7190398e+00 3.6718489e+01 7.2868657e+01 902 | 7.9366702e+01 4.3145909e+01 4.8655298e+01 903 | 9.9923075e+01 3.0192019e+01 4.6272021e+01 904 | 1.1023852e+01 4.3217640e+01 6.5801742e+01 905 | 6.2260116e+01 6.9052386e+01 3.2163042e+01 906 | 1.3257185e+01 5.1228749e+01 5.8092831e+01 907 | 3.1002979e+01 9.9137353e+01 3.0951639e+01 908 | 1.3478769e+01 1.8407145e+01 8.4704918e+01 909 | 2.2332631e+01 5.5896817e+01 5.5726199e+01 910 | 3.9654679e+01 4.8704920e+01 5.3604275e+01 911 | 1.3514349e+01 3.9748637e+01 6.9856295e+01 912 | 2.4105869e+01 4.9284849e+01 5.9346759e+01 913 | 9.2751615e+01 9.6884387e+01 1.1405797e+01 914 | 3.9110087e+01 8.2703186e+01 3.0259495e+01 915 | 5.1126277e+01 1.2838543e+01 7.2021824e+01 916 | 9.2896116e+00 8.4226174e+01 3.5355471e+01 917 | 2.1698914e+00 7.8947447e+01 3.8805942e+01 918 | 1.5953483e+01 3.4483223e+01 7.4854272e+01 919 | 8.4451594e+01 7.3849634e+01 2.7868308e+01 920 | 8.7915348e+01 5.9510178e+00 4.8559992e+01 921 | 1.8698953e+01 5.5864852e+01 5.5740922e+01 922 | 9.9130492e+01 7.8271927e+01 2.3899420e+01 923 | 7.1202984e+01 1.4076745e+01 5.6458466e+01 924 | 8.7136462e+01 5.5765032e+01 3.9042062e+01 925 | 4.7963118e+01 2.0544898e+01 7.3781950e+01 926 | 4.9600493e+01 8.6049171e+01 2.2321577e+01 927 | 2.8753186e+01 2.5735272e+01 8.1327567e+01 928 | 6.0941451e+00 2.7763771e+01 7.9976177e+01 929 | 2.6246770e+01 2.8816628e+01 7.9252270e+01 930 | 1.8626102e+01 7.3477549e+01 4.3071536e+01 931 | 9.1708979e+01 4.9701227e+01 4.2817954e+01 932 | 1.2327869e+01 5.4673471e+00 8.4704918e+01 933 | 1.3445383e+00 1.9128916e+01 8.4704918e+01 934 | 3.6969072e+01 7.2456538e+01 3.8556597e+01 935 | 6.9864111e+01 9.7366140e+01 1.2396330e+01 936 | 8.8934721e+01 7.0448803e+01 3.1183167e+01 937 | 5.9377052e+01 8.0152582e+01 2.2489823e+01 938 | 1.5669090e+01 2.0624791e+01 8.4371494e+01 939 | 3.1668942e+01 7.7266717e+01 3.8536917e+01 940 | 2.3339549e+01 8.7269862e+01 3.3424966e+01 941 | 8.4220637e-01 8.0738926e+01 3.7589217e+01 942 | 3.9690379e+01 7.5662759e+01 3.3761020e+01 943 | 6.4986813e+01 9.0461282e+01 1.1888112e+01 944 | 8.5000606e+00 4.2099859e+01 6.7197352e+01 945 | 7.6880950e+01 6.5840027e+01 3.4346304e+01 946 | 9.6970170e+01 1.2965596e-01 4.6666667e+01 947 | 7.1479723e+01 9.8200178e+01 1.2568247e+01 948 | 7.8196184e+01 4.1231440e+01 5.0509454e+01 949 | 2.3756508e+01 3.4759777e+01 7.4613774e+01 950 | 1.9573076e+01 6.6817227e+01 4.9825387e+01 951 | 2.6321392e+01 4.4367530e+01 6.4252441e+01 952 | 7.1378506e+01 8.3986997e+01 1.9148082e+01 953 | 9.7759974e+01 5.2951640e+01 4.0687411e+01 954 | 6.3712194e+01 2.5714143e+01 5.8407496e+01 955 | 5.4592416e+01 1.5629855e+01 6.9052278e+01 956 | 8.4805722e+01 5.5781613e+01 3.9032692e+01 957 | 8.0209766e+01 9.6130029e+01 1.2388008e+01 958 | 6.6830641e+01 9.5127264e+01 1.2075752e+01 959 | 6.7098263e+01 7.3486523e+01 2.8148077e+01 960 | 8.2064368e+01 2.2255539e+01 5.2125133e+01 961 | 9.7047237e+01 4.9663086e+01 4.2845034e+01 962 | 4.8692500e+01 7.0241713e-01 7.3903390e+01 963 | 8.1746854e+01 3.1619153e+01 5.2791653e+01 964 | 6.4157117e+01 7.3841663e+01 2.7875532e+01 965 | 3.0634936e+01 7.9033593e+01 3.8204050e+01 966 | 6.6093213e+01 4.0028265e+01 5.1127091e+01 967 | 3.5801711e+01 3.9988762e+01 6.5006550e+01 968 | 9.3819943e+01 2.5169191e+01 4.6547487e+01 969 | 4.8766697e+01 9.1911860e+00 7.3848933e+01 970 | 9.0990358e+00 6.0220497e+01 5.3753802e+01 971 | 6.7383412e+01 8.3244850e+01 1.9246582e+01 972 | 5.1488032e+01 2.9348370e+01 6.4595218e+01 973 | 2.2157935e+01 4.6553725e+01 6.1615573e+01 974 | 7.2500937e+01 4.5526841e+00 5.5947581e+01 975 | 6.8246611e+00 8.5722508e+00 8.4704918e+01 976 | 9.6412427e+01 5.1314471e+01 4.1721342e+01 977 | 2.0765659e+01 7.1542739e+01 4.4936170e+01 978 | 1.6111823e+01 3.5435579e+00 8.4704918e+01 979 | 6.3822138e+01 9.7957826e+01 1.1773382e+01 980 | 2.2817289e-02 4.9744925e+01 5.9029463e+01 981 | 3.3563294e+01 7.0074386e+01 4.3969367e+01 982 | 2.7509982e+01 8.0312889e+01 3.7881000e+01 983 | 4.4527520e+00 5.1667426e+01 5.7844372e+01 984 | 9.3896498e+00 5.0269787e+01 5.8685463e+01 985 | 4.0999740e+01 7.5473856e+01 3.3516782e+01 986 | 8.1689232e+01 2.3810722e+01 5.2299518e+01 987 | 8.7051707e+01 9.4307556e+01 1.1686053e+01 988 | 2.2555120e+00 8.8625294e+00 8.4704918e+01 989 | 7.2717698e+01 5.4300949e+01 3.9605106e+01 990 | 8.4800945e+01 9.0345199e+01 1.1909598e+01 991 | 7.2860019e+01 8.6132162e+01 1.7870779e+01 992 | 9.5509863e+01 6.3147979e+01 3.5164643e+01 993 | 6.5635111e+01 2.6236351e+01 5.8088239e+01 994 | 7.4230513e+01 3.7901759e+01 5.2951050e+01 995 | 3.4496601e+01 3.3732378e+01 7.1678036e+01 996 | 8.8402195e+01 3.1459491e+01 4.8097674e+01 997 | 3.4724409e+01 9.4710316e+01 2.8516117e+01 998 | 5.9476681e+00 5.3517088e+01 5.6859880e+01 999 | 7.1841459e+01 7.0195513e+01 3.1597943e+01 1000 | 9.5821429e+01 8.7503796e+01 1.4609444e+01 1001 | -------------------------------------------------------------------------------- /LQ Control/calculations2.nb: -------------------------------------------------------------------------------- 1 | (* Content-type: application/vnd.wolfram.mathematica *) 2 | 3 | (*** Wolfram Notebook File ***) 4 | (* http://www.wolfram.com/nb *) 5 | 6 | (* CreatedBy='Mathematica 11.0' *) 7 | 8 | (*CacheID: 234*) 9 | (* Internal cache information: 10 | NotebookFileLineBreakTest 11 | NotebookFileLineBreakTest 12 | NotebookDataPosition[ 158, 7] 13 | NotebookDataLength[ 49348, 1504] 14 | NotebookOptionsPosition[ 45755, 1381] 15 | NotebookOutlinePosition[ 46098, 1396] 16 | CellTagsIndexPosition[ 46055, 1393] 17 | WindowFrame->Normal*) 18 | 19 | (* Beginning of Notebook Content *) 20 | Notebook[{ 21 | Cell[BoxData[{ 22 | RowBox[{ 23 | RowBox[{"dk", " ", "=", " ", 24 | RowBox[{ 25 | RowBox[{ 26 | RowBox[{"(", 27 | RowBox[{"b1", "-", "d1"}], ")"}], "k"}], "-", 28 | RowBox[{"Y", " ", "a", " ", 29 | RowBox[{"(", 30 | RowBox[{"k", "-", "kV"}], ")"}]}], "+", "kin"}]}], 31 | ";"}], "\[IndentingNewLine]", 32 | RowBox[{ 33 | RowBox[{"ds", " ", "=", " ", 34 | RowBox[{ 35 | RowBox[{"(", 36 | RowBox[{"b2", "-", "d2"}], ")"}], "s"}]}], ";"}], "\[IndentingNewLine]", 37 | RowBox[{ 38 | RowBox[{"dv", " ", "=", " ", 39 | RowBox[{ 40 | RowBox[{ 41 | RowBox[{"-", "d3"}], " ", "v"}], " ", "+", " ", 42 | RowBox[{"a", 43 | RowBox[{"(", 44 | RowBox[{"k", "-", "kV"}], ")"}]}]}]}], ";"}]}], "Input", 45 | CellChangeTimes->{{3.6939923782023354`*^9, 3.6939924123497496`*^9}, { 46 | 3.6939928433848486`*^9, 3.6939928438939*^9}, {3.693993381528658*^9, 47 | 3.69399338234974*^9}}], 48 | 49 | Cell[CellGroupData[{ 50 | 51 | Cell[BoxData[ 52 | RowBox[{ 53 | RowBox[{"Solve", "[", 54 | RowBox[{ 55 | RowBox[{ 56 | RowBox[{"{", 57 | RowBox[{ 58 | RowBox[{"dk", "\[Equal]", "0"}], ",", 59 | RowBox[{"ds", "\[Equal]", "0"}], ",", 60 | RowBox[{"dv", "\[Equal]", "0"}]}], "}"}], "/.", 61 | RowBox[{"{", 62 | RowBox[{"kin", "\[Rule]", "0"}], "}"}]}], ",", " ", 63 | RowBox[{"{", 64 | RowBox[{"k", ",", "s", ",", "v"}], "}"}]}], "]"}], "//", 65 | "FullSimplify"}]], "Input", 66 | CellChangeTimes->{{3.6939924167041855`*^9, 3.6939924514526596`*^9}, { 67 | 3.6939925371782312`*^9, 3.693992540040518*^9}, {3.693993384577963*^9, 68 | 3.693993435609065*^9}}], 69 | 70 | Cell[BoxData[ 71 | RowBox[{"{", 72 | RowBox[{"{", 73 | RowBox[{ 74 | RowBox[{"k", "\[Rule]", 75 | FractionBox[ 76 | RowBox[{"a", " ", "kV", " ", "Y"}], 77 | RowBox[{ 78 | RowBox[{"-", "b1"}], "+", "d1", "+", 79 | RowBox[{"a", " ", "Y"}]}]]}], ",", 80 | RowBox[{"s", "\[Rule]", "0"}], ",", 81 | RowBox[{"v", "\[Rule]", 82 | FractionBox[ 83 | RowBox[{"a", " ", 84 | RowBox[{"(", 85 | RowBox[{"b1", "-", "d1"}], ")"}], " ", "kV"}], 86 | RowBox[{"d3", " ", 87 | RowBox[{"(", 88 | RowBox[{ 89 | RowBox[{"-", "b1"}], "+", "d1", "+", 90 | RowBox[{"a", " ", "Y"}]}], ")"}]}]]}]}], "}"}], "}"}]], "Output", 91 | CellChangeTimes->{ 92 | 3.6939924519127054`*^9, 3.693992540818595*^9, 3.6939928485843687`*^9, { 93 | 3.69399339174868*^9, 3.6939934361631207`*^9}}] 94 | }, Open ]], 95 | 96 | Cell[BoxData[{ 97 | RowBox[{ 98 | RowBox[{"kster", " ", "=", " ", 99 | RowBox[{"k", "+", " ", 100 | FractionBox[ 101 | RowBox[{"a", " ", "kV", " ", "Y"}], 102 | RowBox[{ 103 | RowBox[{"-", "b1"}], "+", "d1", "+", 104 | RowBox[{"a", " ", "Y"}]}]]}]}], ";"}], "\[IndentingNewLine]", 105 | RowBox[{ 106 | RowBox[{"sster", " ", "=", " ", "s"}], ";"}], "\[IndentingNewLine]", 107 | RowBox[{ 108 | RowBox[{"vster", " ", "=", " ", 109 | RowBox[{"v", " ", "+", 110 | FractionBox[ 111 | RowBox[{"a", " ", 112 | RowBox[{"(", 113 | RowBox[{"b1", "-", "d1"}], ")"}], " ", "kV"}], 114 | RowBox[{"d3", " ", 115 | RowBox[{"(", 116 | RowBox[{ 117 | RowBox[{"-", "b1"}], "+", "d1", "+", 118 | RowBox[{"a", " ", "Y"}]}], ")"}]}]]}]}], ";"}]}], "Input", 119 | CellChangeTimes->{{3.6939924572082353`*^9, 3.6939925064531593`*^9}, { 120 | 3.693992546944208*^9, 3.6939925524017534`*^9}, {3.693992673829895*^9, 121 | 3.693992676552167*^9}, {3.6939927873672476`*^9, 3.693992790212532*^9}, { 122 | 3.6939928551500254`*^9, 3.693992865958106*^9}}], 123 | 124 | Cell[CellGroupData[{ 125 | 126 | Cell[BoxData[{ 127 | RowBox[{"dkster", " ", "=", " ", 128 | RowBox[{ 129 | RowBox[{"dk", "/.", 130 | RowBox[{"{", 131 | RowBox[{ 132 | RowBox[{"k", "\[Rule]", "kster"}], ",", 133 | RowBox[{"s", "\[Rule]", "sster"}], ",", 134 | RowBox[{"v", "\[Rule]", "vster"}]}], "}"}]}], "//", 135 | "Simplify"}]}], "\[IndentingNewLine]", 136 | RowBox[{"dsster", " ", "=", " ", 137 | RowBox[{ 138 | RowBox[{"ds", "/.", 139 | RowBox[{"{", 140 | RowBox[{ 141 | RowBox[{"k", "\[Rule]", "kster"}], ",", 142 | RowBox[{"s", "\[Rule]", "sster"}], ",", 143 | RowBox[{"v", "\[Rule]", "vster"}]}], "}"}]}], "//", 144 | "Simplify"}]}], "\[IndentingNewLine]", 145 | RowBox[{"dvster", " ", "=", " ", 146 | RowBox[{ 147 | RowBox[{"dv", "/.", 148 | RowBox[{"{", 149 | RowBox[{ 150 | RowBox[{"k", "\[Rule]", "kster"}], ",", 151 | RowBox[{"s", "\[Rule]", "sster"}], ",", 152 | RowBox[{"v", "\[Rule]", "vster"}]}], "}"}]}], "//", 153 | "Simplify"}]}]}], "Input", 154 | CellChangeTimes->{{3.693992279716488*^9, 3.693992339584474*^9}, { 155 | 3.6939923769042053`*^9, 3.6939923770522203`*^9}, {3.6939926799635086`*^9, 156 | 3.6939927326787796`*^9}, {3.6939934722947335`*^9, 3.693993481046609*^9}}], 157 | 158 | Cell[BoxData[ 159 | RowBox[{ 160 | RowBox[{"b1", " ", "k"}], "-", 161 | RowBox[{"d1", " ", "k"}], "+", "kin", "-", 162 | RowBox[{"a", " ", "k", " ", "Y"}]}]], "Output", 163 | CellChangeTimes->{3.693993481478652*^9}], 164 | 165 | Cell[BoxData[ 166 | RowBox[{ 167 | RowBox[{"(", 168 | RowBox[{"b2", "-", "d2"}], ")"}], " ", "s"}]], "Output", 169 | CellChangeTimes->{3.6939934814816523`*^9}], 170 | 171 | Cell[BoxData[ 172 | RowBox[{ 173 | RowBox[{"a", " ", "k"}], "-", 174 | RowBox[{"d3", " ", "v"}]}]], "Output", 175 | CellChangeTimes->{3.6939934814846525`*^9}] 176 | }, Open ]], 177 | 178 | Cell[CellGroupData[{ 179 | 180 | Cell[BoxData[ 181 | RowBox[{ 182 | RowBox[{"Solve", "[", 183 | RowBox[{ 184 | RowBox[{ 185 | RowBox[{"dkster", "\[Equal]", "0"}], "&&", 186 | RowBox[{"dsster", "\[Equal]", "0"}], "&&", 187 | RowBox[{"dvster", "\[Equal]", "0"}]}], ",", " ", 188 | RowBox[{"{", 189 | RowBox[{"k", ",", "s", ",", "v"}], "}"}]}], "]"}], "//", 190 | "Simplify"}]], "Input", 191 | CellChangeTimes->{{3.6939927378082924`*^9, 3.6939927833198433`*^9}}], 192 | 193 | Cell[BoxData[ 194 | RowBox[{"{", 195 | RowBox[{"{", 196 | RowBox[{ 197 | RowBox[{"k", "\[Rule]", "0"}], ",", 198 | RowBox[{"s", "\[Rule]", "0"}], ",", 199 | RowBox[{"v", "\[Rule]", "0"}]}], "}"}], "}"}]], "Output", 200 | CellChangeTimes->{{3.6939927684503565`*^9, 3.6939927944249535`*^9}, { 201 | 3.69399285879839*^9, 3.693992869623472*^9}}] 202 | }, Open ]], 203 | 204 | Cell[BoxData[{ 205 | RowBox[{ 206 | RowBox[{"kin", " ", "=", " ", "0"}], ";"}], "\[IndentingNewLine]", 207 | RowBox[{ 208 | RowBox[{"b1", " ", "=", " ", "0.02"}], ";"}], "\[IndentingNewLine]", 209 | RowBox[{ 210 | RowBox[{"d2", " ", "=", " ", "0.02"}], ";"}], "\[IndentingNewLine]", 211 | RowBox[{ 212 | RowBox[{"b2", " ", "=", " ", "0.01"}], ";"}], "\[IndentingNewLine]", 213 | RowBox[{ 214 | RowBox[{"d1", " ", "=", " ", "0.01"}], ";"}], "\[IndentingNewLine]", 215 | RowBox[{ 216 | RowBox[{"d3", " ", "=", " ", "0.01"}], ";"}], "\[IndentingNewLine]", 217 | RowBox[{ 218 | RowBox[{"a", " ", "=", " ", "0.001"}], ";"}], "\[IndentingNewLine]", 219 | RowBox[{ 220 | RowBox[{"kV", " ", "=", " ", "2000"}], ";"}], "\[IndentingNewLine]", 221 | RowBox[{ 222 | RowBox[{"Y", " ", "=", " ", "100"}], ";"}], "\[IndentingNewLine]", 223 | RowBox[{ 224 | RowBox[{"k0", " ", "=", " ", "1000"}], ";"}], "\[IndentingNewLine]", 225 | RowBox[{ 226 | RowBox[{"s0", " ", "=", " ", "500"}], ";"}], "\[IndentingNewLine]", 227 | RowBox[{ 228 | RowBox[{"v0", " ", "=", " ", "20"}], ";"}]}], "Input"], 229 | 230 | Cell[CellGroupData[{ 231 | 232 | Cell[BoxData[{ 233 | RowBox[{ 234 | RowBox[{"(", 235 | RowBox[{"A1", " ", "=", " ", 236 | RowBox[{"{", 237 | RowBox[{ 238 | RowBox[{"{", 239 | RowBox[{ 240 | RowBox[{"b1", "-", "d1", "-", 241 | RowBox[{"Y", "*", "a"}]}], ",", "0", ",", "0"}], "}"}], ",", 242 | RowBox[{"{", 243 | RowBox[{"0", ",", 244 | RowBox[{"b2", "-", "d2"}], ",", "0"}], "}"}], ",", 245 | RowBox[{"{", 246 | RowBox[{"a", ",", "0", ",", 247 | RowBox[{"-", "d3"}]}], "}"}]}], "}"}]}], ")"}], "//", 248 | "MatrixForm"}], "\[IndentingNewLine]", 249 | RowBox[{ 250 | RowBox[{"(", 251 | RowBox[{"B1", " ", "=", " ", 252 | RowBox[{"{", 253 | RowBox[{ 254 | RowBox[{"{", "1", "}"}], ",", 255 | RowBox[{"{", "0", "}"}], ",", 256 | RowBox[{"{", "0", "}"}]}], "}"}]}], ")"}], "//", 257 | "MatrixForm"}], "\[IndentingNewLine]", 258 | RowBox[{ 259 | RowBox[{"(", 260 | RowBox[{"C1", " ", "=", " ", 261 | RowBox[{"IdentityMatrix", "[", "3", "]"}]}], ")"}], "//", 262 | "MatrixForm"}], "\[IndentingNewLine]", 263 | RowBox[{ 264 | RowBox[{"(", 265 | RowBox[{"D1", " ", "=", " ", 266 | RowBox[{"{", 267 | RowBox[{ 268 | RowBox[{"{", "0", "}"}], ",", 269 | RowBox[{"{", "0", "}"}], ",", 270 | RowBox[{"{", "0", "}"}]}], "}"}]}], ")"}], "//", 271 | "MatrixForm"}]}], "Input", 272 | CellChangeTimes->{{3.693993996877187*^9, 3.6939940857640743`*^9}}], 273 | 274 | Cell[BoxData[ 275 | TagBox[ 276 | RowBox[{"(", "\[NoBreak]", GridBox[{ 277 | { 278 | RowBox[{"-", "0.09000000000000001`"}], "0", "0"}, 279 | {"0", 280 | RowBox[{"-", "0.01`"}], "0"}, 281 | {"0.001`", "0", 282 | RowBox[{"-", "0.01`"}]} 283 | }, 284 | GridBoxAlignment->{ 285 | "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 286 | "RowsIndexed" -> {}}, 287 | GridBoxSpacings->{"Columns" -> { 288 | Offset[0.27999999999999997`], { 289 | Offset[0.7]}, 290 | Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { 291 | Offset[0.2], { 292 | Offset[0.4]}, 293 | Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 294 | Function[BoxForm`e$, 295 | MatrixForm[BoxForm`e$]]]], "Output", 296 | CellChangeTimes->{3.6939940861151094`*^9}], 297 | 298 | Cell[BoxData[ 299 | TagBox[ 300 | RowBox[{"(", "\[NoBreak]", GridBox[{ 301 | {"1"}, 302 | {"0"}, 303 | {"0"} 304 | }, 305 | GridBoxAlignment->{ 306 | "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 307 | "RowsIndexed" -> {}}, 308 | GridBoxSpacings->{"Columns" -> { 309 | Offset[0.27999999999999997`], { 310 | Offset[0.7]}, 311 | Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { 312 | Offset[0.2], { 313 | Offset[0.4]}, 314 | Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 315 | Function[BoxForm`e$, 316 | MatrixForm[BoxForm`e$]]]], "Output", 317 | CellChangeTimes->{3.6939940861181097`*^9}], 318 | 319 | Cell[BoxData[ 320 | TagBox[ 321 | RowBox[{"(", "\[NoBreak]", GridBox[{ 322 | {"1", "0", "0"}, 323 | {"0", "1", "0"}, 324 | {"0", "0", "1"} 325 | }, 326 | GridBoxAlignment->{ 327 | "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 328 | "RowsIndexed" -> {}}, 329 | GridBoxSpacings->{"Columns" -> { 330 | Offset[0.27999999999999997`], { 331 | Offset[0.7]}, 332 | Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { 333 | Offset[0.2], { 334 | Offset[0.4]}, 335 | Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 336 | Function[BoxForm`e$, 337 | MatrixForm[BoxForm`e$]]]], "Output", 338 | CellChangeTimes->{3.69399408612111*^9}], 339 | 340 | Cell[BoxData[ 341 | TagBox[ 342 | RowBox[{"(", "\[NoBreak]", GridBox[{ 343 | {"0"}, 344 | {"0"}, 345 | {"0"} 346 | }, 347 | GridBoxAlignment->{ 348 | "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 349 | "RowsIndexed" -> {}}, 350 | GridBoxSpacings->{"Columns" -> { 351 | Offset[0.27999999999999997`], { 352 | Offset[0.7]}, 353 | Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { 354 | Offset[0.2], { 355 | Offset[0.4]}, 356 | Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 357 | Function[BoxForm`e$, 358 | MatrixForm[BoxForm`e$]]]], "Output", 359 | CellChangeTimes->{3.69399408612411*^9}] 360 | }, Open ]], 361 | 362 | Cell[CellGroupData[{ 363 | 364 | Cell[BoxData[ 365 | RowBox[{"systeem1", " ", "=", " ", 366 | RowBox[{"StateSpaceModel", "[", 367 | RowBox[{"{", 368 | RowBox[{"A1", ",", "B1", ",", "C1", ",", "D1"}], "}"}], "]"}]}]], "Input", 369 | CellChangeTimes->{{3.693994089430441*^9, 3.6939941066861663`*^9}}], 370 | 371 | Cell[BoxData[ 372 | TemplateBox[{ 373 | RowBox[{"-", "0.09000000000000001`"}],"0","0","1","0", 374 | RowBox[{"-", "0.01`"}],"0","0","0.001`","0",RowBox[{"-", "0.01`"}],"0","1", 375 | "0","0","0","0","1","0","0","0","0","1","0",InterpretationBox[ 376 | "\[InvisibleSpace]", None],{ 377 | StateSpaceModel, { 378 | False, False, { 379 | False, False}}, {$CellContext`stname1, $CellContext`stname2, \ 380 | $CellContext`stname3}, {{Control`CommonDump`$DUMMY$}, { 381 | Control`CommonDump`$DUMMY$, Control`CommonDump`$DUMMY$, 382 | Control`CommonDump`$DUMMY$}, { 383 | Control`CommonDump`$DUMMY$, Control`CommonDump`$DUMMY$, 384 | Control`CommonDump`$DUMMY$}}, Identity, Automatic, 1, 3, 3, 1, {}, { 385 | False, False}, False, Automatic, None, Automatic},{}}, 386 | "StateSpaceModelFull", 387 | BaseStyle->{NumberMarks -> False}, 388 | DisplayFunction->(TagBox[ 389 | SubsuperscriptBox[ 390 | RowBox[{"(", 391 | GridBox[{{#, #2, #3, #4}, {#5, #6, #7, #8}, {#9, #10, #11, #12}, {#13, \ 392 | #14, #15, #16}, {#17, #18, #19, #20}, {#21, #22, #23, #24}}, 393 | AllowedDimensions -> {4, 6}, AutoDelete -> False, 394 | AllowScriptLevelChange -> False, ColumnAlignments -> {Center}, 395 | BaseStyle -> {Deployed -> False}, GridBoxItemStyle -> {}, 396 | GridBoxDividers -> {"Rows" -> {False, False, False, 397 | Directive[ 398 | GrayLevel[0], 399 | GrayLevel[0.6]], {False}, False}, 400 | "Columns" -> {False, False, False, 401 | Directive[ 402 | GrayLevel[0], 403 | GrayLevel[0.6]], {False}, False}}, 404 | GridBoxBackground -> {"Rows" -> {{ 405 | GrayLevel[1], 406 | RGBColor[0.8, 0.9, 0.9]}}}], ")"}], #25, 407 | ButtonBox[ 408 | GraphicsBox[{ 409 | RGBColor[0.8, 0.85, 0.85], 410 | EdgeForm[ 411 | RGBColor[0.6, 0.7, 0.7]], 412 | RectangleBox[{0, 0}, RoundingRadius -> Offset[2.5]], 413 | InsetBox[ 414 | StyleBox[ 415 | "\[ScriptCapitalS]", Control`NonlinearModelsDump`LineColor -> 416 | GrayLevel[0], Control`NonlinearModelsDump`FrontFaceColor -> 417 | GrayLevel[0], Control`NonlinearModelsDump`BackFaceColor -> 418 | GrayLevel[0], GraphicsColor -> GrayLevel[0], FontSize -> 12, 419 | FontColor -> GrayLevel[0]], {0.5, 0.5}]}, ImageSize -> 20], 420 | ButtonFunction :> Control`Typesetting`SystemsModelTypesetToggle[ 421 | ButtonNotebook[], FE`CMObj], Evaluator -> Automatic, Appearance -> 422 | None], MultilineFunction -> None], 423 | EventHandlerTag[{"MouseEntered" :> {FE`CMObj = MathLink`CallFrontEnd[ 424 | FrontEnd`Value[ 425 | FEPrivate`Self[]]]}, PassEventsDown -> True, PassEventsUp -> 426 | True}]]& ), 427 | InterpretationFunction->(RowBox[{"StateSpaceModel", "[", 428 | RowBox[{"{", 429 | RowBox[{"{", 430 | RowBox[{"{", 431 | TemplateSlotSequence[{1, 3}, ","], "}"}], ",", 432 | RowBox[{"{", 433 | TemplateSlotSequence[{5, 7}, ","], "}"}], ",", 434 | RowBox[{"{", 435 | TemplateSlotSequence[{9, 11}, ","], "}"}], "}"}], ",", 436 | RowBox[{"{", 437 | RowBox[{"{", 438 | TemplateSlotSequence[{4, 4}, ","], "}"}], ",", 439 | RowBox[{"{", 440 | TemplateSlotSequence[{8, 8}, ","], "}"}], ",", 441 | RowBox[{"{", 442 | TemplateSlotSequence[{12, 12}, ","], "}"}], "}"}], ",", 443 | RowBox[{"{", 444 | RowBox[{"{", 445 | TemplateSlotSequence[{13, 15}, ","], "}"}], ",", 446 | RowBox[{"{", 447 | TemplateSlotSequence[{17, 19}, ","], "}"}], ",", 448 | RowBox[{"{", 449 | TemplateSlotSequence[{21, 23}, ","], "}"}], "}"}], ",", 450 | RowBox[{"{", 451 | RowBox[{"{", 452 | TemplateSlotSequence[{16, 16}, ","], "}"}], ",", 453 | RowBox[{"{", 454 | TemplateSlotSequence[{20, 20}, ","], "}"}], ",", 455 | RowBox[{"{", 456 | TemplateSlotSequence[{24, 24}, ","], "}"}], "}"}], "}"}], ",", 457 | "SamplingPeriod", "->", 458 | RowBox[{#25}], ",", "SystemsModelLabels", "->", "None", "]"}]& ), 459 | Tooltip->StateSpaceModel]], "Output", 460 | CellChangeTimes->{3.6939941073962374`*^9}] 461 | }, Open ]], 462 | 463 | Cell[CellGroupData[{ 464 | 465 | Cell[BoxData[ 466 | RowBox[{"Eigenvalues", "[", "A1", "]"}]], "Input", 467 | CellChangeTimes->{{3.6939941221297107`*^9, 3.6939941284483423`*^9}}], 468 | 469 | Cell[BoxData[ 470 | RowBox[{"{", 471 | RowBox[{ 472 | RowBox[{"-", "0.09000000000000001`"}], ",", 473 | RowBox[{"-", "0.01`"}], ",", 474 | RowBox[{"-", "0.01`"}]}], "}"}]], "Output", 475 | CellChangeTimes->{3.6939941289323907`*^9}] 476 | }, Open ]], 477 | 478 | Cell[CellGroupData[{ 479 | 480 | Cell[BoxData[ 481 | RowBox[{"ControllableModelQ", "[", "systeem1", "]"}]], "Input", 482 | CellChangeTimes->{{3.69399431014651*^9, 3.693994320894585*^9}}], 483 | 484 | Cell[BoxData[ 485 | TemplateBox[{ 486 | "LyapunovSolve","meig", 487 | "\"Matrix with multiple eigenvalues encountered. The solution may be \ 488 | inaccurate or may not exist.\"",2,97,13,17607212627329856836,"Local"}, 489 | "MessageTemplate"]], "Message", "MSG", 490 | CellChangeTimes->{3.693994321393635*^9}], 491 | 492 | Cell[BoxData["False"], "Output", 493 | CellChangeTimes->{3.693994321395635*^9}] 494 | }, Open ]], 495 | 496 | Cell[CellGroupData[{ 497 | 498 | Cell[BoxData[ 499 | RowBox[{ 500 | RowBox[{"(", 501 | RowBox[{"P", "=", 502 | RowBox[{"ControllabilityMatrix", "[", "systeem1", "]"}]}], ")"}], "//", 503 | "MatrixForm"}]], "Input", 504 | CellChangeTimes->{{3.6939943239118867`*^9, 3.6939943404165373`*^9}}], 505 | 506 | Cell[BoxData[ 507 | TagBox[ 508 | RowBox[{"(", "\[NoBreak]", GridBox[{ 509 | {"1", 510 | RowBox[{"-", "0.09000000000000001`"}], "0.008100000000000001`"}, 511 | {"0", "0.`", "0.`"}, 512 | {"0", "0.001`", 513 | RowBox[{"-", "0.0001`"}]} 514 | }, 515 | GridBoxAlignment->{ 516 | "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 517 | "RowsIndexed" -> {}}, 518 | GridBoxSpacings->{"Columns" -> { 519 | Offset[0.27999999999999997`], { 520 | Offset[0.7]}, 521 | Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { 522 | Offset[0.2], { 523 | Offset[0.4]}, 524 | Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 525 | Function[BoxForm`e$, 526 | MatrixForm[BoxForm`e$]]]], "Output", 527 | CellChangeTimes->{{3.6939943302315187`*^9, 3.6939943405105467`*^9}}] 528 | }, Open ]], 529 | 530 | Cell[CellGroupData[{ 531 | 532 | Cell[BoxData[ 533 | RowBox[{ 534 | RowBox[{"(", 535 | RowBox[{"T1", " ", "=", " ", 536 | RowBox[{"Transpose", "[", 537 | RowBox[{"{", 538 | RowBox[{ 539 | RowBox[{"P", "[", 540 | RowBox[{"[", 541 | RowBox[{"All", ",", "1"}], "]"}], "]"}], ",", 542 | RowBox[{"P", "[", 543 | RowBox[{"[", 544 | RowBox[{"All", ",", "2"}], "]"}], "]"}], ",", 545 | RowBox[{"Cross", "[", 546 | RowBox[{ 547 | RowBox[{"P", "[", 548 | RowBox[{"[", 549 | RowBox[{"All", ",", "1"}], "]"}], "]"}], ",", 550 | RowBox[{"P", "[", 551 | RowBox[{"[", 552 | RowBox[{"All", ",", "2"}], "]"}], "]"}]}], "]"}]}], "}"}], "]"}]}], 553 | ")"}], "//", "MatrixForm"}]], "Input", 554 | CellChangeTimes->{{3.6939943959210873`*^9, 3.693994451148609*^9}}], 555 | 556 | Cell[BoxData[ 557 | TagBox[ 558 | RowBox[{"(", "\[NoBreak]", GridBox[{ 559 | {"1", 560 | RowBox[{"-", "0.09000000000000001`"}], "0.`"}, 561 | {"0", "0.`", 562 | RowBox[{"-", "0.001`"}]}, 563 | {"0", "0.001`", "0.`"} 564 | }, 565 | GridBoxAlignment->{ 566 | "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 567 | "RowsIndexed" -> {}}, 568 | GridBoxSpacings->{"Columns" -> { 569 | Offset[0.27999999999999997`], { 570 | Offset[0.7]}, 571 | Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { 572 | Offset[0.2], { 573 | Offset[0.4]}, 574 | Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 575 | Function[BoxForm`e$, 576 | MatrixForm[BoxForm`e$]]]], "Output", 577 | CellChangeTimes->{{3.6939944453080254`*^9, 3.6939944514766417`*^9}}] 578 | }, Open ]], 579 | 580 | Cell[CellGroupData[{ 581 | 582 | Cell[BoxData[{ 583 | RowBox[{ 584 | RowBox[{"(", 585 | RowBox[{"AT1", " ", "=", " ", 586 | RowBox[{"T1", ".", "A1", ".", 587 | RowBox[{"Inverse", "[", "T1", "]"}]}]}], ")"}], "//", 588 | "MatrixForm"}], "\[IndentingNewLine]", 589 | RowBox[{ 590 | RowBox[{"(", 591 | RowBox[{"BT1", " ", "=", " ", 592 | RowBox[{"T1", ".", "B1"}]}], ")"}], "//", 593 | "MatrixForm"}], "\[IndentingNewLine]", 594 | RowBox[{ 595 | RowBox[{"(", 596 | RowBox[{"Z", " ", "=", " ", 597 | RowBox[{ 598 | RowBox[{"Inverse", "[", "T1", "]"}], ".", 599 | RowBox[{"{", 600 | RowBox[{ 601 | RowBox[{"{", "k", "}"}], ",", 602 | RowBox[{"{", "s", "}"}], ",", 603 | RowBox[{"{", "v", "}"}]}], "}"}]}]}], ")"}], "//", 604 | "MatrixForm"}]}], "Input", 605 | CellChangeTimes->{{3.693994454447939*^9, 3.6939945407345667`*^9}, { 606 | 3.6939945786533585`*^9, 3.693994578859379*^9}}], 607 | 608 | Cell[BoxData[ 609 | TagBox[ 610 | RowBox[{"(", "\[NoBreak]", GridBox[{ 611 | { 612 | RowBox[{"-", "0.09000000000000001`"}], "0.`", 613 | RowBox[{"-", "7.200000000000001`"}]}, 614 | { 615 | RowBox[{"-", "1.`*^-6"}], 616 | RowBox[{"-", "0.01`"}], 617 | RowBox[{"-", "0.00009`"}]}, 618 | {"0.`", "0.`", 619 | RowBox[{"-", "0.01`"}]} 620 | }, 621 | GridBoxAlignment->{ 622 | "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 623 | "RowsIndexed" -> {}}, 624 | GridBoxSpacings->{"Columns" -> { 625 | Offset[0.27999999999999997`], { 626 | Offset[0.7]}, 627 | Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { 628 | Offset[0.2], { 629 | Offset[0.4]}, 630 | Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 631 | Function[BoxForm`e$, 632 | MatrixForm[BoxForm`e$]]]], "Output", 633 | CellChangeTimes->{3.693994541052599*^9, 3.6939945792304163`*^9}], 634 | 635 | Cell[BoxData[ 636 | TagBox[ 637 | RowBox[{"(", "\[NoBreak]", GridBox[{ 638 | {"1.`"}, 639 | {"0.`"}, 640 | {"0.`"} 641 | }, 642 | GridBoxAlignment->{ 643 | "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 644 | "RowsIndexed" -> {}}, 645 | GridBoxSpacings->{"Columns" -> { 646 | Offset[0.27999999999999997`], { 647 | Offset[0.7]}, 648 | Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { 649 | Offset[0.2], { 650 | Offset[0.4]}, 651 | Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 652 | Function[BoxForm`e$, 653 | MatrixForm[BoxForm`e$]]]], "Output", 654 | CellChangeTimes->{3.693994541052599*^9, 3.6939945792354164`*^9}], 655 | 656 | Cell[BoxData[ 657 | TagBox[ 658 | RowBox[{"(", "\[NoBreak]", GridBox[{ 659 | { 660 | RowBox[{"0.`", "\[VeryThinSpace]", "+", 661 | RowBox[{"1.`", " ", "k"}], "+", 662 | RowBox[{"90.00000000000001`", " ", "v"}]}]}, 663 | { 664 | RowBox[{"0.`", "\[VeryThinSpace]", "+", 665 | RowBox[{"1000.`", " ", "v"}]}]}, 666 | { 667 | RowBox[{"0.`", "\[VeryThinSpace]", "-", 668 | RowBox[{"1000.`", " ", "s"}]}]} 669 | }, 670 | GridBoxAlignment->{ 671 | "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 672 | "RowsIndexed" -> {}}, 673 | GridBoxSpacings->{"Columns" -> { 674 | Offset[0.27999999999999997`], { 675 | Offset[0.7]}, 676 | Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { 677 | Offset[0.2], { 678 | Offset[0.4]}, 679 | Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 680 | Function[BoxForm`e$, 681 | MatrixForm[BoxForm`e$]]]], "Output", 682 | CellChangeTimes->{3.693994541052599*^9, 3.693994579239417*^9}] 683 | }, Open ]], 684 | 685 | Cell[CellGroupData[{ 686 | 687 | Cell[BoxData[{ 688 | RowBox[{ 689 | RowBox[{"(", 690 | RowBox[{"T2", " ", "=", " ", 691 | RowBox[{"{", 692 | RowBox[{ 693 | RowBox[{"{", 694 | RowBox[{"1", ",", "0", ",", "0"}], "}"}], ",", 695 | RowBox[{"{", 696 | RowBox[{"0", ",", "0", ",", "1"}], "}"}], ",", 697 | RowBox[{"{", 698 | RowBox[{"0", ",", "1", ",", "0"}], "}"}]}], "}"}]}], ")"}], "//", 699 | "MatrixForm"}], "\[IndentingNewLine]", 700 | RowBox[{ 701 | RowBox[{"(", 702 | RowBox[{"AT2", " ", "=", " ", 703 | RowBox[{"T2", ".", "A1", ".", 704 | RowBox[{"Inverse", "[", "T2", "]"}]}]}], ")"}], "//", 705 | "MatrixForm"}], "\[IndentingNewLine]", 706 | RowBox[{ 707 | RowBox[{"(", 708 | RowBox[{"BT2", " ", "=", " ", 709 | RowBox[{"T2", ".", "B1"}]}], ")"}], "//", 710 | "MatrixForm"}], "\[IndentingNewLine]", 711 | RowBox[{ 712 | RowBox[{"(", 713 | RowBox[{"Z", " ", "=", " ", 714 | RowBox[{ 715 | RowBox[{"Inverse", "[", "T2", "]"}], ".", 716 | RowBox[{"{", 717 | RowBox[{ 718 | RowBox[{"{", "k", "}"}], ",", 719 | RowBox[{"{", "s", "}"}], ",", 720 | RowBox[{"{", "v", "}"}]}], "}"}]}]}], ")"}], "//", 721 | "MatrixForm"}]}], "Input", 722 | CellChangeTimes->{{3.6939945467681704`*^9, 3.6939945921137047`*^9}}], 723 | 724 | Cell[BoxData[ 725 | TagBox[ 726 | RowBox[{"(", "\[NoBreak]", GridBox[{ 727 | {"1", "0", "0"}, 728 | {"0", "0", "1"}, 729 | {"0", "1", "0"} 730 | }, 731 | GridBoxAlignment->{ 732 | "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 733 | "RowsIndexed" -> {}}, 734 | GridBoxSpacings->{"Columns" -> { 735 | Offset[0.27999999999999997`], { 736 | Offset[0.7]}, 737 | Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { 738 | Offset[0.2], { 739 | Offset[0.4]}, 740 | Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 741 | Function[BoxForm`e$, 742 | MatrixForm[BoxForm`e$]]]], "Output", 743 | CellChangeTimes->{3.6939945924047337`*^9}], 744 | 745 | Cell[BoxData[ 746 | TagBox[ 747 | RowBox[{"(", "\[NoBreak]", GridBox[{ 748 | { 749 | RowBox[{"-", "0.09000000000000001`"}], "0.`", "0.`"}, 750 | {"0.001`", 751 | RowBox[{"-", "0.01`"}], "0.`"}, 752 | {"0.`", "0.`", 753 | RowBox[{"-", "0.01`"}]} 754 | }, 755 | GridBoxAlignment->{ 756 | "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 757 | "RowsIndexed" -> {}}, 758 | GridBoxSpacings->{"Columns" -> { 759 | Offset[0.27999999999999997`], { 760 | Offset[0.7]}, 761 | Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { 762 | Offset[0.2], { 763 | Offset[0.4]}, 764 | Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 765 | Function[BoxForm`e$, 766 | MatrixForm[BoxForm`e$]]]], "Output", 767 | CellChangeTimes->{3.6939945924067335`*^9}], 768 | 769 | Cell[BoxData[ 770 | TagBox[ 771 | RowBox[{"(", "\[NoBreak]", GridBox[{ 772 | {"1"}, 773 | {"0"}, 774 | {"0"} 775 | }, 776 | GridBoxAlignment->{ 777 | "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 778 | "RowsIndexed" -> {}}, 779 | GridBoxSpacings->{"Columns" -> { 780 | Offset[0.27999999999999997`], { 781 | Offset[0.7]}, 782 | Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { 783 | Offset[0.2], { 784 | Offset[0.4]}, 785 | Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 786 | Function[BoxForm`e$, 787 | MatrixForm[BoxForm`e$]]]], "Output", 788 | CellChangeTimes->{3.693994592410734*^9}], 789 | 790 | Cell[BoxData[ 791 | TagBox[ 792 | RowBox[{"(", "\[NoBreak]", GridBox[{ 793 | {"k"}, 794 | {"v"}, 795 | {"s"} 796 | }, 797 | GridBoxAlignment->{ 798 | "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 799 | "RowsIndexed" -> {}}, 800 | GridBoxSpacings->{"Columns" -> { 801 | Offset[0.27999999999999997`], { 802 | Offset[0.7]}, 803 | Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { 804 | Offset[0.2], { 805 | Offset[0.4]}, 806 | Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 807 | Function[BoxForm`e$, 808 | MatrixForm[BoxForm`e$]]]], "Output", 809 | CellChangeTimes->{3.6939945924137344`*^9}] 810 | }, Open ]], 811 | 812 | Cell[CellGroupData[{ 813 | 814 | Cell[BoxData[ 815 | RowBox[{"Eigenvalues", "[", "A1", "]"}]], "Input", 816 | CellChangeTimes->{{3.6939946090163946`*^9, 3.693994613586851*^9}}], 817 | 818 | Cell[BoxData[ 819 | RowBox[{"{", 820 | RowBox[{ 821 | RowBox[{"-", "0.09000000000000001`"}], ",", 822 | RowBox[{"-", "0.01`"}], ",", 823 | RowBox[{"-", "0.01`"}]}], "}"}]], "Output", 824 | CellChangeTimes->{3.6939946140168943`*^9}] 825 | }, Open ]], 826 | 827 | Cell[CellGroupData[{ 828 | 829 | Cell[BoxData[{ 830 | RowBox[{ 831 | RowBox[{"K", " ", "=", " ", 832 | RowBox[{"{", 833 | RowBox[{"{", 834 | RowBox[{"k1", ",", "k2"}], "}"}], "}"}]}], ";"}], "\[IndentingNewLine]", 835 | RowBox[{"eig", " ", "=", " ", 836 | RowBox[{"Eigenvalues", "[", 837 | RowBox[{ 838 | RowBox[{"AT2", "[", 839 | RowBox[{"[", 840 | RowBox[{ 841 | RowBox[{"1", ";;", "2"}], ",", 842 | RowBox[{"1", ";;", "2"}]}], "]"}], "]"}], "+", 843 | RowBox[{ 844 | RowBox[{"BT2", "[", 845 | RowBox[{"[", 846 | RowBox[{"1", ";;", "2"}], "]"}], "]"}], ".", "K"}]}], 847 | "]"}]}]}], "Input", 848 | CellChangeTimes->{{3.693995663243807*^9, 3.6939956952460065`*^9}, { 849 | 3.693995792240705*^9, 3.693995825341015*^9}, {3.693996003532832*^9, 850 | 3.6939960289703755`*^9}}], 851 | 852 | Cell[BoxData[ 853 | RowBox[{"{", 854 | RowBox[{ 855 | RowBox[{"0.5`", " ", 856 | RowBox[{"(", 857 | RowBox[{ 858 | RowBox[{"-", "0.1`"}], "+", 859 | RowBox[{"1.`", " ", "k1"}], "-", 860 | SqrtBox[ 861 | RowBox[{"0.006400000000000001`", "\[VeryThinSpace]", "-", 862 | RowBox[{"0.16`", " ", "k1"}], "+", 863 | RowBox[{"1.`", " ", 864 | SuperscriptBox["k1", "2"]}], "+", 865 | RowBox[{"0.004`", " ", "k2"}]}]]}], ")"}]}], ",", 866 | RowBox[{"0.5`", " ", 867 | RowBox[{"(", 868 | RowBox[{ 869 | RowBox[{"-", "0.1`"}], "+", 870 | RowBox[{"1.`", " ", "k1"}], "+", 871 | SqrtBox[ 872 | RowBox[{"0.006400000000000001`", "\[VeryThinSpace]", "-", 873 | RowBox[{"0.16`", " ", "k1"}], "+", 874 | RowBox[{"1.`", " ", 875 | SuperscriptBox["k1", "2"]}], "+", 876 | RowBox[{"0.004`", " ", "k2"}]}]]}], ")"}]}]}], "}"}]], "Output", 877 | CellChangeTimes->{ 878 | 3.6939956959650784`*^9, {3.6939958083673177`*^9, 3.6939958258960705`*^9}, { 879 | 3.6939960040438833`*^9, 3.6939960292644053`*^9}}] 880 | }, Open ]], 881 | 882 | Cell[CellGroupData[{ 883 | 884 | Cell[BoxData[ 885 | RowBox[{"Reduce", "[", 886 | RowBox[{ 887 | RowBox[{ 888 | RowBox[{ 889 | RowBox[{"Re", "[", 890 | RowBox[{"eig", "[", 891 | RowBox[{"[", "1", "]"}], "]"}], "]"}], "==", 892 | RowBox[{"-", "1"}]}], "&&", " ", 893 | RowBox[{ 894 | RowBox[{"Re", "[", 895 | RowBox[{"eig", "[", 896 | RowBox[{"[", "2", "]"}], "]"}], "]"}], "==", 897 | RowBox[{"-", "1"}]}]}], ",", 898 | RowBox[{"{", 899 | RowBox[{"k1", ",", "k2"}], "}"}], ",", "Reals"}], "]"}]], "Input", 900 | CellChangeTimes->{{3.6939956980652885`*^9, 3.6939957134658284`*^9}, { 901 | 3.6939957455720387`*^9, 3.693995763398821*^9}, {3.69399582829331*^9, 902 | 3.6939958731517954`*^9}, {3.6939959122407036`*^9, 3.693995914415921*^9}}], 903 | 904 | Cell[BoxData[ 905 | TemplateBox[{ 906 | "Reduce","ratnz", 907 | "\"Reduce was unable to solve the system with inexact coefficients. The \ 908 | answer was obtained by solving a corresponding exact system and numericizing \ 909 | the result.\"",2,189,44,17607212627329856836,"Local"}, 910 | "MessageTemplate"]], "Message", "MSG", 911 | CellChangeTimes->{ 912 | 3.693995874020882*^9, 3.6939959148539653`*^9, {3.6939960095584345`*^9, 913 | 3.6939960317296515`*^9}}], 914 | 915 | Cell[BoxData[ 916 | RowBox[{ 917 | RowBox[{"k1", "\[Equal]", 918 | RowBox[{"-", "1.9`"}]}], "&&", 919 | RowBox[{"k2", "\[Equal]", 920 | RowBox[{"-", "980.1`"}]}]}]], "Output", 921 | CellChangeTimes->{ 922 | 3.6939958741108913`*^9, 3.6939959149149714`*^9, {3.693996009633442*^9, 923 | 3.6939960317986584`*^9}}] 924 | }, Open ]], 925 | 926 | Cell[CellGroupData[{ 927 | 928 | , 929 | 930 | Cell[BoxData[ 931 | TagBox[ 932 | RowBox[{"(", "\[NoBreak]", GridBox[{ 933 | {"c1", "c2", "0"}, 934 | {"0", "0", "c3"} 935 | }, 936 | GridBoxAlignment->{ 937 | "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 938 | "RowsIndexed" -> {}}, 939 | GridBoxSpacings->{"Columns" -> { 940 | Offset[0.27999999999999997`], { 941 | Offset[0.7]}, 942 | Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { 943 | Offset[0.2], { 944 | Offset[0.4]}, 945 | Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 946 | Function[BoxForm`e$, 947 | MatrixForm[BoxForm`e$]]]], "Output", 948 | CellChangeTimes->{ 949 | 3.6939989386815243`*^9, {3.693998972884944*^9, 3.6939989891005654`*^9}}], 950 | 951 | Cell[BoxData[ 952 | TagBox[ 953 | RowBox[{"(", "\[NoBreak]", GridBox[{ 954 | {"0"}, 955 | {"0"} 956 | }, 957 | GridBoxAlignment->{ 958 | "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 959 | "RowsIndexed" -> {}}, 960 | GridBoxSpacings->{"Columns" -> { 961 | Offset[0.27999999999999997`], { 962 | Offset[0.7]}, 963 | Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { 964 | Offset[0.2], { 965 | Offset[0.4]}, 966 | Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 967 | Function[BoxForm`e$, 968 | MatrixForm[BoxForm`e$]]]], "Output", 969 | CellChangeTimes->{ 970 | 3.6939989386815243`*^9, {3.693998972884944*^9, 3.693998989106566*^9}}] 971 | }, Open ]], 972 | 973 | Cell[CellGroupData[{ 974 | 975 | Cell[BoxData[ 976 | RowBox[{"systeem2", " ", "=", " ", 977 | RowBox[{"StateSpaceModel", "[", 978 | RowBox[{"{", 979 | RowBox[{"A2", ",", "B2", ",", "C2", ",", "D2"}], "}"}], "]"}]}]], "Input", 980 | CellChangeTimes->{{3.6939989446501207`*^9, 3.693998976772333*^9}}], 981 | 982 | Cell[BoxData[ 983 | TemplateBox[{ 984 | RowBox[{"-", "0.09000000000000001`"}],"0","0","1","0", 985 | RowBox[{"-", "0.01`"}],"0","0","0.001`","0",RowBox[{"-", "0.01`"}],"0", 986 | "0.5`","0.4`","0","0","0","0","2","0",InterpretationBox[ 987 | "\[InvisibleSpace]", None],{ 988 | StateSpaceModel, { 989 | False, False, { 990 | False, False}}, {$CellContext`stname1, $CellContext`stname2, \ 991 | $CellContext`stname3}, {{Control`CommonDump`$DUMMY$}, { 992 | Control`CommonDump`$DUMMY$, Control`CommonDump`$DUMMY$}, { 993 | Control`CommonDump`$DUMMY$, Control`CommonDump`$DUMMY$, 994 | Control`CommonDump`$DUMMY$}}, Identity, Automatic, 1, 2, 3, 1, {}, { 995 | False, False}, False, Automatic, None, Automatic},{}}, 996 | "StateSpaceModelFull", 997 | BaseStyle->{NumberMarks -> False}, 998 | DisplayFunction->(TagBox[ 999 | SubsuperscriptBox[ 1000 | RowBox[{"(", 1001 | GridBox[{{#, #2, #3, #4}, {#5, #6, #7, #8}, {#9, #10, #11, #12}, {#13, \ 1002 | #14, #15, #16}, {#17, #18, #19, #20}}, AllowedDimensions -> {4, 5}, 1003 | AutoDelete -> False, AllowScriptLevelChange -> False, 1004 | ColumnAlignments -> {Center}, BaseStyle -> {Deployed -> False}, 1005 | GridBoxItemStyle -> {}, 1006 | GridBoxDividers -> {"Rows" -> {False, False, False, 1007 | Directive[ 1008 | GrayLevel[0], 1009 | GrayLevel[0.6]], {False}, False}, 1010 | "Columns" -> {False, False, False, 1011 | Directive[ 1012 | GrayLevel[0], 1013 | GrayLevel[0.6]], {False}, False}}, 1014 | GridBoxBackground -> {"Rows" -> {{ 1015 | GrayLevel[1], 1016 | RGBColor[0.8, 0.9, 0.9]}}}], ")"}], #21, 1017 | ButtonBox[ 1018 | GraphicsBox[{ 1019 | RGBColor[0.8, 0.85, 0.85], 1020 | EdgeForm[ 1021 | RGBColor[0.6, 0.7, 0.7]], 1022 | RectangleBox[{0, 0}, RoundingRadius -> Offset[2.5]], 1023 | InsetBox[ 1024 | StyleBox[ 1025 | "\[ScriptCapitalS]", Control`NonlinearModelsDump`LineColor -> 1026 | GrayLevel[0], Control`NonlinearModelsDump`FrontFaceColor -> 1027 | GrayLevel[0], Control`NonlinearModelsDump`BackFaceColor -> 1028 | GrayLevel[0], GraphicsColor -> GrayLevel[0], FontSize -> 12, 1029 | FontColor -> GrayLevel[0]], {0.5, 0.5}]}, ImageSize -> 20], 1030 | ButtonFunction :> Control`Typesetting`SystemsModelTypesetToggle[ 1031 | ButtonNotebook[], FE`CMObj], Evaluator -> Automatic, Appearance -> 1032 | None], MultilineFunction -> None], 1033 | EventHandlerTag[{"MouseEntered" :> {FE`CMObj = MathLink`CallFrontEnd[ 1034 | FrontEnd`Value[ 1035 | FEPrivate`Self[]]]}, PassEventsDown -> True, PassEventsUp -> 1036 | True}]]& ), 1037 | InterpretationFunction->(RowBox[{"StateSpaceModel", "[", 1038 | RowBox[{"{", 1039 | RowBox[{"{", 1040 | RowBox[{"{", 1041 | TemplateSlotSequence[{1, 3}, ","], "}"}], ",", 1042 | RowBox[{"{", 1043 | TemplateSlotSequence[{5, 7}, ","], "}"}], ",", 1044 | RowBox[{"{", 1045 | TemplateSlotSequence[{9, 11}, ","], "}"}], "}"}], ",", 1046 | RowBox[{"{", 1047 | RowBox[{"{", 1048 | TemplateSlotSequence[{4, 4}, ","], "}"}], ",", 1049 | RowBox[{"{", 1050 | TemplateSlotSequence[{8, 8}, ","], "}"}], ",", 1051 | RowBox[{"{", 1052 | TemplateSlotSequence[{12, 12}, ","], "}"}], "}"}], ",", 1053 | RowBox[{"{", 1054 | RowBox[{"{", 1055 | TemplateSlotSequence[{13, 15}, ","], "}"}], ",", 1056 | RowBox[{"{", 1057 | TemplateSlotSequence[{17, 19}, ","], "}"}], "}"}], ",", 1058 | RowBox[{"{", 1059 | RowBox[{"{", 1060 | TemplateSlotSequence[{16, 16}, ","], "}"}], ",", 1061 | RowBox[{"{", 1062 | TemplateSlotSequence[{20, 20}, ","], "}"}], "}"}], "}"}], ",", 1063 | "SamplingPeriod", "->", 1064 | RowBox[{#21}], ",", "SystemsModelLabels", "->", "None", "]"}]& ), 1065 | Tooltip->StateSpaceModel]], "Output", 1066 | CellChangeTimes->{{3.6939989772723827`*^9, 3.693998990918747*^9}, 1067 | 3.6939993960442553`*^9}] 1068 | }, Open ]], 1069 | 1070 | Cell[CellGroupData[{ 1071 | 1072 | Cell[BoxData[ 1073 | RowBox[{ 1074 | RowBox[{"ObservabilityMatrix", "[", "systeem2", "]"}], "//", 1075 | "MatrixRank"}]], "Input", 1076 | CellChangeTimes->{{3.693998994376093*^9, 3.693999050438699*^9}}], 1077 | 1078 | Cell[BoxData["3"], "Output", 1079 | CellChangeTimes->{ 1080 | 3.6939990022798834`*^9, {3.693999041821837*^9, 3.6939990508747425`*^9}}] 1081 | }, Open ]], 1082 | 1083 | Cell[BoxData[{ 1084 | RowBox[{ 1085 | RowBox[{"c1", " ", "=", " ", "0.5"}], ";"}], "\[IndentingNewLine]", 1086 | RowBox[{ 1087 | RowBox[{"c2", " ", "=", " ", "0.4"}], ";"}], "\[IndentingNewLine]", 1088 | RowBox[{ 1089 | RowBox[{"c3", " ", "=", " ", "2"}], ";"}], "\[IndentingNewLine]", 1090 | RowBox[{ 1091 | RowBox[{"H", " ", "=", " ", 1092 | RowBox[{"{", 1093 | RowBox[{ 1094 | RowBox[{"{", 1095 | RowBox[{"1", ",", "1"}], "}"}], ",", 1096 | RowBox[{"{", 1097 | RowBox[{"1", ",", "1"}], "}"}], ",", 1098 | RowBox[{"{", 1099 | RowBox[{"0", ",", "1"}], "}"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", 1100 | RowBox[{"Eigenvalues", "[", 1101 | RowBox[{"A2", "-", 1102 | RowBox[{"H", ".", "C2"}]}], "]"}]}], "Input", 1103 | CellChangeTimes->{{3.6939993138450365`*^9, 3.6939993727609277`*^9}}], 1104 | 1105 | Cell[CellGroupData[{ 1106 | 1107 | Cell[BoxData[{ 1108 | RowBox[{ 1109 | RowBox[{"C3", " ", "=", " ", 1110 | RowBox[{"{", 1111 | RowBox[{"{", 1112 | RowBox[{"0", ",", "0", ",", "c3"}], "}"}], "}"}]}], 1113 | ";"}], "\[IndentingNewLine]", 1114 | RowBox[{ 1115 | RowBox[{"D3", " ", "=", " ", 1116 | RowBox[{"{", 1117 | RowBox[{"{", "0", "}"}], "}"}]}], ";"}], "\[IndentingNewLine]", 1118 | RowBox[{"systeem3", " ", "=", " ", 1119 | RowBox[{"StateSpaceModel", "[", 1120 | RowBox[{"{", 1121 | RowBox[{"A2", ",", "B2", ",", "C3", ",", "D3"}], "}"}], "]"}]}]}], "Input", 1122 | CellChangeTimes->{{3.694001238809621*^9, 3.6940012989626355`*^9}}], 1123 | 1124 | Cell[BoxData[ 1125 | TemplateBox[{ 1126 | RowBox[{"-", "0.09000000000000001`"}],"0","0","1","0", 1127 | RowBox[{"-", "0.01`"}],"0","0","0.001`","0",RowBox[{"-", "0.01`"}],"0","0", 1128 | "0","2","0",InterpretationBox["\[InvisibleSpace]", None],{ 1129 | StateSpaceModel, { 1130 | False, False, { 1131 | False, False}}, {$CellContext`stname1, $CellContext`stname2, \ 1132 | $CellContext`stname3}, {{Control`CommonDump`$DUMMY$}, { 1133 | Control`CommonDump`$DUMMY$}, { 1134 | Control`CommonDump`$DUMMY$, Control`CommonDump`$DUMMY$, 1135 | Control`CommonDump`$DUMMY$}}, Identity, Automatic, 1, 1, 3, 1, {}, { 1136 | False, False}, False, Automatic, None, Automatic},{}}, 1137 | "StateSpaceModelFull", 1138 | BaseStyle->{NumberMarks -> False}, 1139 | DisplayFunction->(TagBox[ 1140 | SubsuperscriptBox[ 1141 | RowBox[{"(", 1142 | GridBox[{{#, #2, #3, #4}, {#5, #6, #7, #8}, {#9, #10, #11, #12}, {#13, \ 1143 | #14, #15, #16}}, AllowedDimensions -> {4, 4}, AutoDelete -> False, 1144 | AllowScriptLevelChange -> False, ColumnAlignments -> {Center}, 1145 | BaseStyle -> {Deployed -> False}, GridBoxItemStyle -> {}, 1146 | GridBoxDividers -> {"Rows" -> {False, False, False, 1147 | Directive[ 1148 | GrayLevel[0], 1149 | GrayLevel[0.6]], {False}, False}, 1150 | "Columns" -> {False, False, False, 1151 | Directive[ 1152 | GrayLevel[0], 1153 | GrayLevel[0.6]], {False}, False}}, 1154 | GridBoxBackground -> {"Rows" -> {{ 1155 | GrayLevel[1], 1156 | RGBColor[0.8, 0.9, 0.9]}}}], ")"}], #17, 1157 | ButtonBox[ 1158 | GraphicsBox[{ 1159 | RGBColor[0.8, 0.85, 0.85], 1160 | EdgeForm[ 1161 | RGBColor[0.6, 0.7, 0.7]], 1162 | RectangleBox[{0, 0}, RoundingRadius -> Offset[2.5]], 1163 | InsetBox[ 1164 | StyleBox[ 1165 | "\[ScriptCapitalS]", Control`NonlinearModelsDump`LineColor -> 1166 | GrayLevel[0], Control`NonlinearModelsDump`FrontFaceColor -> 1167 | GrayLevel[0], Control`NonlinearModelsDump`BackFaceColor -> 1168 | GrayLevel[0], GraphicsColor -> GrayLevel[0], FontSize -> 12, 1169 | FontColor -> GrayLevel[0]], {0.5, 0.5}]}, ImageSize -> 20], 1170 | ButtonFunction :> Control`Typesetting`SystemsModelTypesetToggle[ 1171 | ButtonNotebook[], FE`CMObj], Evaluator -> Automatic, Appearance -> 1172 | None], MultilineFunction -> None], 1173 | EventHandlerTag[{"MouseEntered" :> {FE`CMObj = MathLink`CallFrontEnd[ 1174 | FrontEnd`Value[ 1175 | FEPrivate`Self[]]]}, PassEventsDown -> True, PassEventsUp -> 1176 | True}]]& ), 1177 | InterpretationFunction->(RowBox[{"StateSpaceModel", "[", 1178 | RowBox[{"{", 1179 | RowBox[{"{", 1180 | RowBox[{"{", 1181 | TemplateSlotSequence[{1, 3}, ","], "}"}], ",", 1182 | RowBox[{"{", 1183 | TemplateSlotSequence[{5, 7}, ","], "}"}], ",", 1184 | RowBox[{"{", 1185 | TemplateSlotSequence[{9, 11}, ","], "}"}], "}"}], ",", 1186 | RowBox[{"{", 1187 | RowBox[{"{", 1188 | TemplateSlotSequence[{4, 4}, ","], "}"}], ",", 1189 | RowBox[{"{", 1190 | TemplateSlotSequence[{8, 8}, ","], "}"}], ",", 1191 | RowBox[{"{", 1192 | TemplateSlotSequence[{12, 12}, ","], "}"}], "}"}], ",", 1193 | RowBox[{"{", 1194 | RowBox[{"{", 1195 | TemplateSlotSequence[{13, 15}, ","], "}"}], "}"}], ",", 1196 | RowBox[{"{", 1197 | RowBox[{"{", 1198 | TemplateSlotSequence[{16, 16}, ","], "}"}], "}"}], "}"}], ",", 1199 | "SamplingPeriod", "->", 1200 | RowBox[{#17}], ",", "SystemsModelLabels", "->", "None", "]"}]& ), 1201 | Tooltip->StateSpaceModel]], "Output", 1202 | CellChangeTimes->{{3.6940012799087305`*^9, 3.694001299628702*^9}}] 1203 | }, Open ]], 1204 | 1205 | Cell[CellGroupData[{ 1206 | 1207 | Cell[BoxData[ 1208 | RowBox[{"ObservableModelQ", "[", "systeem3", "]"}]], "Input", 1209 | CellChangeTimes->{{3.693999341063758*^9, 3.693999341741826*^9}, { 1210 | 3.69400130281402*^9, 3.6940013085605955`*^9}}], 1211 | 1212 | Cell[BoxData[ 1213 | TemplateBox[{ 1214 | "LyapunovSolve","meig", 1215 | "\"Matrix with multiple eigenvalues encountered. The solution may be \ 1216 | inaccurate or may not exist.\"",2,223,46,17607212627329856836,"Local"}, 1217 | "MessageTemplate"]], "Message", "MSG", 1218 | CellChangeTimes->{3.694001309088648*^9}], 1219 | 1220 | Cell[BoxData["False"], "Output", 1221 | CellChangeTimes->{3.6940013090906477`*^9}] 1222 | }, Open ]], 1223 | 1224 | Cell[CellGroupData[{ 1225 | 1226 | Cell[BoxData[ 1227 | RowBox[{ 1228 | RowBox[{"(", 1229 | RowBox[{"S", " ", "=", " ", 1230 | RowBox[{"ObservabilityMatrix", "[", "systeem3", "]"}]}], ")"}], "//", 1231 | "MatrixForm"}]], "Input", 1232 | CellChangeTimes->{{3.6940017766253967`*^9, 3.6940017927630105`*^9}}], 1233 | 1234 | Cell[BoxData[ 1235 | TagBox[ 1236 | RowBox[{"(", "\[NoBreak]", GridBox[{ 1237 | {"0", "0", "2"}, 1238 | {"0.002`", "0.`", 1239 | RowBox[{"-", "0.02`"}]}, 1240 | { 1241 | RowBox[{"-", "0.0002`"}], "0.`", "0.0002`"} 1242 | }, 1243 | GridBoxAlignment->{ 1244 | "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 1245 | "RowsIndexed" -> {}}, 1246 | GridBoxSpacings->{"Columns" -> { 1247 | Offset[0.27999999999999997`], { 1248 | Offset[0.7]}, 1249 | Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { 1250 | Offset[0.2], { 1251 | Offset[0.4]}, 1252 | Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 1253 | Function[BoxForm`e$, 1254 | MatrixForm[BoxForm`e$]]]], "Output", 1255 | CellChangeTimes->{3.694001793915126*^9}] 1256 | }, Open ]], 1257 | 1258 | Cell[CellGroupData[{ 1259 | 1260 | Cell[BoxData[ 1261 | RowBox[{ 1262 | RowBox[{"(", 1263 | RowBox[{"T2", " ", "=", " ", 1264 | RowBox[{"Transpose", "[", 1265 | RowBox[{"{", 1266 | RowBox[{ 1267 | RowBox[{"S", "[", 1268 | RowBox[{"[", 1269 | RowBox[{"All", ",", "1"}], "]"}], "]"}], ",", 1270 | RowBox[{"S", "[", 1271 | RowBox[{"[", 1272 | RowBox[{"All", ",", "3"}], "]"}], "]"}], ",", 1273 | RowBox[{"Cross", "[", 1274 | RowBox[{ 1275 | RowBox[{"S", "[", 1276 | RowBox[{"[", 1277 | RowBox[{"All", ",", "1"}], "]"}], "]"}], ",", 1278 | RowBox[{"S", "[", 1279 | RowBox[{"[", 1280 | RowBox[{"All", ",", "3"}], "]"}], "]"}]}], "]"}]}], "}"}], "]"}]}], 1281 | ")"}], "//", "MatrixForm"}]], "Input", 1282 | CellChangeTimes->{{3.6940017985405884`*^9, 3.6940018348022137`*^9}, { 1283 | 3.6940019210068336`*^9, 3.694001933660099*^9}}], 1284 | 1285 | Cell[BoxData[ 1286 | TagBox[ 1287 | RowBox[{"(", "\[NoBreak]", GridBox[{ 1288 | {"0", "2", 1289 | RowBox[{"-", "3.6000000000000003`*^-6"}]}, 1290 | {"0.002`", 1291 | RowBox[{"-", "0.02`"}], 1292 | RowBox[{"-", "0.0004`"}]}, 1293 | { 1294 | RowBox[{"-", "0.0002`"}], "0.0002`", 1295 | RowBox[{"-", "0.004`"}]} 1296 | }, 1297 | GridBoxAlignment->{ 1298 | "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 1299 | "RowsIndexed" -> {}}, 1300 | GridBoxSpacings->{"Columns" -> { 1301 | Offset[0.27999999999999997`], { 1302 | Offset[0.7]}, 1303 | Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { 1304 | Offset[0.2], { 1305 | Offset[0.4]}, 1306 | Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 1307 | Function[BoxForm`e$, 1308 | MatrixForm[BoxForm`e$]]]], "Output", 1309 | CellChangeTimes->{{3.694001926094342*^9, 3.694001933903123*^9}}] 1310 | }, Open ]], 1311 | 1312 | Cell[BoxData[ 1313 | RowBox[{ 1314 | RowBox[{"AT3", " ", "=", " ", 1315 | RowBox[{"T2", ".", "A2", ".", 1316 | RowBox[{"Inverse", "[", "T2", "]"}]}]}], ";"}]], "Input", 1317 | CellChangeTimes->{{3.694001837849519*^9, 3.69400188187092*^9}}], 1318 | 1319 | Cell[CellGroupData[{ 1320 | 1321 | Cell[BoxData[ 1322 | RowBox[{"A22", " ", "=", " ", 1323 | RowBox[{"AT3", "[", 1324 | RowBox[{"[", 1325 | RowBox[{ 1326 | RowBox[{"2", ";;", "3"}], ",", 1327 | RowBox[{"2", ";;", "3"}]}], "]"}], "]"}]}]], "Input", 1328 | CellChangeTimes->{{3.6940018937021036`*^9, 3.694001904959229*^9}}], 1329 | 1330 | Cell[BoxData[ 1331 | RowBox[{"{", 1332 | RowBox[{ 1333 | RowBox[{"{", 1334 | RowBox[{ 1335 | RowBox[{"-", "0.08940586976558962`"}], ",", "0.007941302344104062`"}], 1336 | "}"}], ",", 1337 | RowBox[{"{", 1338 | RowBox[{"0.005940588760517927`", ",", 1339 | RowBox[{"-", "0.010594112394820753`"}]}], "}"}]}], "}"}]], "Output", 1340 | CellChangeTimes->{{3.6940019055432873`*^9, 3.6940019376885014`*^9}}] 1341 | }, Open ]], 1342 | 1343 | Cell[CellGroupData[{ 1344 | 1345 | Cell[BoxData[ 1346 | RowBox[{"Eigenvalues", "[", "A22", "]"}]], "Input", 1347 | CellChangeTimes->{{3.6940019105837917`*^9, 3.694001945221255*^9}}], 1348 | 1349 | Cell[BoxData[ 1350 | RowBox[{"{", 1351 | RowBox[{ 1352 | RowBox[{"-", "0.08999998216041037`"}], ",", 1353 | RowBox[{"-", "0.01`"}]}], "}"}]], "Output", 1354 | CellChangeTimes->{3.694001911909924*^9, 3.6940019457393064`*^9}] 1355 | }, Open ]] 1356 | }, 1357 | WindowSize->{778, 840}, 1358 | WindowMargins->{{567, Automatic}, {57, Automatic}}, 1359 | FrontEndVersion->"11.0 for Microsoft Windows (64-bit) (July 28, 2016)", 1360 | StyleDefinitions->"Default.nb" 1361 | ] 1362 | (* End of Notebook Content *) 1363 | 1364 | (* Internal cache information *) 1365 | (*CellTagsOutline 1366 | CellTagsIndex->{} 1367 | *) 1368 | (*CellTagsIndex 1369 | CellTagsIndex->{} 1370 | *) 1371 | (*NotebookFileOutline 1372 | Notebook[{ 1373 | Cell[558, 20, 835, 26, 69, "Input"], 1374 | Cell[CellGroupData[{ 1375 | Cell[1418, 50, 614, 17, 30, "Input"], 1376 | Cell[2035, 69, 769, 23, 49, "Output"] 1377 | }, Open ]], 1378 | Cell[2819, 95, 985, 26, 107, "Input"], 1379 | Cell[CellGroupData[{ 1380 | Cell[3829, 125, 1115, 30, 69, "Input"], 1381 | Cell[4947, 157, 195, 5, 30, "Output"], 1382 | Cell[5145, 164, 143, 4, 30, "Output"], 1383 | Cell[5291, 170, 141, 4, 30, "Output"] 1384 | }, Open ]], 1385 | Cell[CellGroupData[{ 1386 | Cell[5469, 179, 403, 11, 30, "Input"], 1387 | Cell[5875, 192, 318, 8, 30, "Output"] 1388 | }, Open ]], 1389 | Cell[6208, 203, 978, 24, 240, "Input"], 1390 | Cell[CellGroupData[{ 1391 | Cell[7211, 231, 1263, 40, 88, "Input"], 1392 | Cell[8477, 273, 759, 22, 77, "Output"], 1393 | Cell[9239, 297, 631, 19, 77, "Output"], 1394 | Cell[9873, 318, 658, 19, 77, "Output"], 1395 | Cell[10534, 339, 628, 19, 77, "Output"] 1396 | }, Open ]], 1397 | Cell[CellGroupData[{ 1398 | Cell[11199, 363, 249, 5, 30, "Input"], 1399 | Cell[11451, 370, 3970, 89, 120, "Output"] 1400 | }, Open ]], 1401 | Cell[CellGroupData[{ 1402 | Cell[15458, 464, 135, 2, 30, "Input"], 1403 | Cell[15596, 468, 211, 6, 30, "Output"] 1404 | }, Open ]], 1405 | Cell[CellGroupData[{ 1406 | Cell[15844, 479, 143, 2, 30, "Input"], 1407 | Cell[15990, 483, 282, 6, 21, "Message"], 1408 | Cell[16275, 491, 74, 1, 30, "Output"] 1409 | }, Open ]], 1410 | Cell[CellGroupData[{ 1411 | Cell[16386, 497, 236, 6, 30, "Input"], 1412 | Cell[16625, 505, 785, 21, 77, "Output"] 1413 | }, Open ]], 1414 | Cell[CellGroupData[{ 1415 | Cell[17447, 531, 744, 22, 50, "Input"], 1416 | Cell[18194, 555, 766, 21, 77, "Output"] 1417 | }, Open ]], 1418 | Cell[CellGroupData[{ 1419 | Cell[18997, 581, 796, 24, 69, "Input"], 1420 | Cell[19796, 607, 878, 25, 79, "Output"], 1421 | Cell[20677, 634, 659, 19, 77, "Output"], 1422 | Cell[21339, 655, 949, 26, 77, "Output"] 1423 | }, Open ]], 1424 | Cell[CellGroupData[{ 1425 | Cell[22325, 686, 1124, 35, 88, "Input"], 1426 | Cell[23452, 723, 661, 19, 77, "Output"], 1427 | Cell[24116, 744, 769, 22, 77, "Output"], 1428 | Cell[24888, 768, 629, 19, 77, "Output"], 1429 | Cell[25520, 789, 631, 19, 77, "Output"] 1430 | }, Open ]], 1431 | Cell[CellGroupData[{ 1432 | Cell[26188, 813, 133, 2, 30, "Input"], 1433 | Cell[26324, 817, 211, 6, 30, "Output"] 1434 | }, Open ]], 1435 | Cell[CellGroupData[{ 1436 | Cell[26572, 828, 709, 21, 50, "Input"], 1437 | Cell[27284, 851, 982, 27, 84, "Output"] 1438 | }, Open ]], 1439 | Cell[CellGroupData[{ 1440 | Cell[28303, 883, 678, 18, 30, "Input"], 1441 | Cell[28984, 903, 423, 9, 39, "Message"], 1442 | Cell[29410, 914, 282, 8, 30, "Output"] 1443 | }, Open ]], 1444 | Cell[CellGroupData[{ 1445 | Cell[29729, 927, 852, 25, 107, "Input"], 1446 | Cell[30584, 954, 693, 19, 60, "Output"], 1447 | Cell[31280, 975, 668, 19, 60, "Output"] 1448 | }, Open ]], 1449 | Cell[CellGroupData[{ 1450 | Cell[31985, 999, 249, 5, 30, "Input"], 1451 | Cell[32237, 1006, 3787, 85, 103, "Output"] 1452 | }, Open ]], 1453 | Cell[CellGroupData[{ 1454 | Cell[36061, 1096, 181, 4, 30, "Input"], 1455 | Cell[36245, 1102, 123, 2, 30, "Output"] 1456 | }, Open ]], 1457 | Cell[36383, 1107, 722, 20, 107, "Input"], 1458 | Cell[CellGroupData[{ 1459 | Cell[37130, 1131, 547, 15, 69, InheritFromParent], 1460 | Cell[37680, 1148, 3506, 78, 86, "Output"] 1461 | }, Open ]], 1462 | Cell[CellGroupData[{ 1463 | Cell[41223, 1231, 192, 3, 30, "Input"], 1464 | Cell[41418, 1236, 283, 6, 21, "Message"], 1465 | Cell[41704, 1244, 76, 1, 30, "Output"] 1466 | }, Open ]], 1467 | Cell[CellGroupData[{ 1468 | Cell[41817, 1250, 244, 6, 30, "Input"], 1469 | Cell[42064, 1258, 728, 21, 77, "Output"] 1470 | }, Open ]], 1471 | Cell[CellGroupData[{ 1472 | Cell[42829, 1284, 797, 23, 50, "Input"], 1473 | Cell[43629, 1309, 847, 24, 79, "Output"] 1474 | }, Open ]], 1475 | Cell[44491, 1336, 217, 5, 30, "Input"], 1476 | Cell[CellGroupData[{ 1477 | Cell[44733, 1345, 262, 7, 30, "Input"], 1478 | Cell[44998, 1354, 367, 10, 30, "Output"] 1479 | }, Open ]], 1480 | Cell[CellGroupData[{ 1481 | Cell[45402, 1369, 134, 2, 30, "Input"], 1482 | Cell[45539, 1373, 200, 5, 63, "Output"] 1483 | }, Open ]] 1484 | } 1485 | ] 1486 | *) 1487 | 1488 | --------------------------------------------------------------------------------