Final Project Japnit Sethi
Final Project Japnit Sethi
clc
clear all
pause('off')
close all
= +
Rate of Change of State Vector = A_Numeric * State Vector + B_Numeric * Input Vector
= +
The LQR function requires a state weighing matrix Q and an actuator weighing matrix R.
In order to design the State weighing matrix Q, we will use the "output weighing"
Note: Varying the weighting matrices Q and R allows us to trade off the "size" of the state response with the size of
the control effort. For example,
If << , then cost function will minimize the amount of control effort needed (i.e. gains will be small).
If >> , then cost function will minimize the state response without regard to amount of control effort needed
(i.e. gains will be large).
Note: Q is technically going to be a diagonal matrix, with each diagonal element corresponding to a specific state,
so for example we want state element 1 to have the least error then we can make the diagonal element from the Q
matrix corresponding to state element 1 larger than others to do so.
% Problem 1a.
Performance requirements:
1. where = 3000000 N or 3e6 N
2.
3.
4. Also Each of the above states input control signals must have their maximum value within 10% of the peak
limit i.e
5. AUV must completely enter the tunnel without contacting the barrier
6. Minimize the time it takes to enter the tunnel
7. 5% Settling time of all three outputs must be less than 1 second.
Requirements Passed:
• 5% Settling times: X - 0.77 seconds, Z - 0.36 seconds , - 0.69 seconds
• Input Control Signal: - 6e+5, - 2e+6, - 2.95e+6
• Time Taken for AUV to Enter the Tunnel: 0.9 seconds
% Problem 1b.
% Simulating initial value response for closed loop system using LQR
% optimal control gains
A_closed = A_ol - B_ol * K_lqr; % equivalent closed-loop A
% cl_sys = ss(A_closed,[],C_ol,[]); % closed loop sys
cl_sys = ss(A_closed,B_ol,C_ol,D_ol); % closed loop sys
tfinal = 0.9; % time in tfinal seconds for simulation in order to capture the instant my auv
enters tunnel and cut off that extra time it goes forward and comes back
[Y_lqr,t_lqr,X_lqr] = initial(cl_sys, State_Variable_Vector_0, tfinal);
disp('Poles to the closed loop system using LQR optimal control gains are: ');
Poles to the closed loop system using LQR optimal control gains are:
disp(pole(cl_sys));
-2.7037 + 2.7007i
-2.7037 - 2.7007i
-15.4706 +15.4569i
-15.4706 -15.4569i
-5.4072 + 5.3274i
-5.4072 - 5.3274i
% Calculating 5% Settling time for all three outputs of closed loop system
SimulationStuff1 = lsiminfo(Y_lqr(:,1),t_lqr,'SettlingTimeThreshold',0.05);
SimulationStuff2 = lsiminfo(Y_lqr(:,2),t_lqr,'SettlingTimeThreshold',0.05);
SimulationStuff3 = lsiminfo(Y_lqr(:,3),t_lqr,'SettlingTimeThreshold',0.05);
disp(' ======== Closed-Loop System using LQR Control gains ========= ');
disp(' ');
Max_of_Thrust_X_T = max(Thrust(1,:));
Max_of_Stern_Thrust_Z_s = max(Thrust(2,:));
Max_of_Bow_Thrust_Z_b = max(Thrust(3,:));
% worst_control_Thrust = max(max(Thrust));
fprintf('<strong> Max Thrust X_T is: %6.f N or %.1e N </strong>', Max_of_Thrust_X_T,
Max_of_Thrust_X_T);
% Plotting Inputs
figure()
subplot(3,1,1)
plot(t_lqr,Thrust(1,:));
grid on
hRefl=refline(0,3e6);
set(hRefl,'color','r','linestyle','--'); % Max horizontal
hRef2=refline(0,-3e6);
set(hRef2,'color','r','linestyle','--'); % Min horizontal
title('Plot of Input w.r.t time');
xlabel('Time (seconds)')
ylabel('Thrust X_T (N)')
legend('Thrust X_T (N)','Upper Limit','Lower Limit');
xlim([0 tfinal]);
ylim([-4e6 4e6]);
subplot(3,1,2)
plot(t_lqr,Thrust(2,:));
grid on
hRefl=refline(0,3e6);
set(hRefl,'color','r','linestyle','--'); % Max horizontal
hRef2=refline(0,-3e6);
set(hRef2,'color','r','linestyle','--'); % Min horizontal
title('Plot of Input w.r.t time');
xlabel('Time (seconds)')
ylabel('Stern Thrust Z_s (N)')
legend('Stern Thrust Z_s (N)','Upper Limit','Lower Limit');
xlim([0 tfinal]);
ylim([-4e6 4e6]);
subplot(3,1,3)
plot(t_lqr,Thrust(3,:));
grid on
hRefl=refline(0,3e6);
set(hRefl,'color','r','linestyle','--'); % Max horizontal
hRef2=refline(0,-3e6);
set(hRef2,'color','r','linestyle','--'); % Min horizontal
title('Plot of Input w.r.t time');
xlabel('Time (seconds)')
ylabel('Bow Thrust Z_b (N)')
legend('Bow Thrust Z_b (N)','Upper Limit','Lower Limit');
xlim([0 tfinal]);
ylim([-4e6 4e6]);
% In order to maximize the figure window in Windows
set(gcf, 'Units', 'Normalized', 'OuterPosition', [0, 0.04, 1, 0.96]);
figure()
% Construct the 1st plot of just Positions in m
subplot(3,1,1)
plot(t_lqr,Y_lqr(:,1));
grid on
hold on
plot(t_lqr,Y_lqr(:,2));
title(['Final Output Response of Position with initial values (Position in X direction (x),
Depth (z), Pitch Angle (theta))',...
' = (50, 350, 45)']);
xlabel('Time (seconds)');
ylabel('Position (m)');
xlim([0 tfinal]);
plot(SimulationStuff1.SettlingTime, X_at_SettlingTime,'kO');
text(SimulationStuff1.SettlingTime, X_at_SettlingTime,['('
num2str(SimulationStuff1.SettlingTime) ',' num2str(X_at_SettlingTime) ')']);
plot(SimulationStuff2.SettlingTime, Depth_at_SettlingTime,'kO');
text(SimulationStuff2.SettlingTime, Depth_at_SettlingTime,['('
num2str(SimulationStuff2.SettlingTime) ',' num2str(Depth_at_SettlingTime) ')']);
legend('Position in X (x) in m', 'Depth (z) in m','5% Settling time Coordinates');
hold off
plot(SimulationStuff3.SettlingTime, PitchAngle_at_SettlingTime,'kO');
text(SimulationStuff3.SettlingTime, PitchAngle_at_SettlingTime,['('
num2str(SimulationStuff3.SettlingTime) ',' num2str(PitchAngle_at_SettlingTime) ')']);
legend('Pitch Angle (theta) in rad','5% Settling time Coordinates');
xlim([0 tfinal]);
% ylim([-0.3 1]);
hold off
% animate_auv(t,x,z,theta,savemovie);
animate_auv(t_lqr,Y_lqr(:,1),Y_lqr(:,2),Y_lqr(:,3), 0);
title('Closed loop system with lqr control gains:');
% In order to maximize the figure window in Windows
set(gcf, 'Units', 'Normalized', 'OuterPosition', [0, 0.04, 1, 0.96]);
Observability
The reason we need to check for observability is because just like controller design problem we check for
controllability, we need to check if the observability matrix is full rank such that we can arbitarily place poles of an
observer we design.
If the rank of the observability matrix is equal to the maximum possible rank, then the system is observable.
For example: If we have aobservability matrix O, that has a rank N, where N is the number of columns of A matrix
of size NxN, and matrix O is defined as
Note: We also need to check which components of the Output Matrix feeding into the observable system after being
multiplied by Matrix C have an impact on the observatibility of the system.
Conclusion: Since none of the subsets or combination of subsets of the outputs result in full rank observable matrix
therefore there is no subset which is able to result in a fully observable system.
% Problem 2.
disp(Rank_O_Observability);
if Rank_O_Observability == 6
disp('<strong> Thus, the LTI system is completely observable </strong>');
end
disp(Rank_O_Observability_without_Output_1);
disp(Rank_O_Observability_without_Output_2);
disp(Rank_O_Observability_without_Output_3);
The rank of the observability matrix with Output 1 & 2 zerod is:
disp(Rank_O_Observability_without_Output_1_2);
The rank of the observability matrix with Output 1 & 3 zerod is:
disp(Rank_O_Observability_without_Output_1_3);
The rank of the observability matrix with Output 2 & 3 zerod is:
disp(Rank_O_Observability_without_Output_2_3);
2
Design Luenberger Observer
Reason: In many systems of practical importance, the entire state vector is not available for measurement. Thus a
dynamic state estimator (like Luenberger Observer) can be designed to construct an approximation to the full state
vector on the basis of available measurements (using actual outputs y)
% Problem 3a.
% We need A_obs', C_obs' and the eigenvalues of the desired system first
% First display the current pole locations, and then ramp up the gains by a
% factor of 10 or so without worrying about control effort, because the
% observer is purely virtual. Pole locations (eigenvalues) of lone system:
damp(ol_sys)
damp(cl_sys)
Pole Damping Frequency Time Constant
(rad/seconds) (seconds)
% Push them reasonalby far left, as control effort is not an issue for
% this purely virtual system
%Note: Increasing Damping (wn) speeds up the convergence of the observer
%response and the plant (Actual response)
Desired_Obs_Poles = 200*CL_Poles; % make w_n 200 times larger for desired
% Separating the imaginary and real parts of all poles in order to plot
% First, Luenberger Observer Poles
Desired_Obs_Poles_Real = real(Desired_Obs_Poles); % Real parts
Desired_Obs_Poles_Imag = imag(Desired_Obs_Poles); % Imaginary parts
hold on
pzmap(cl_sys, 'k') % plot the closed-loop poles/zeros on the p-z chart
%scatter(CL_poles_real,CL_poles_imag, 'k x')
sgrid
axis equal
xlim([-250, 0]);
legend4 = legend('Open-Loop Poles', 'Closed-Loop Poles', 'Observer Poles');
set(legend4,'Position',...
[0.5827381,0.693650797056,0.27321428,0.12619047274]);
title('Pole-Zero Map for Various Systems');
hold off
Note: The Augmented state-space system has twice as many states and outputs as the plant.
Here and are the dynamic estimator x and y's, such that the state estimation error dynamics is e = x -
Note: In order to Simulate, Our 1st stage is an LTI model i.e. an augmented system including open-loop plant and
observer without state feedback control
2nd Stage is the same augmented system, but now includes the state feedback control i.e we switch on the
controller once the stage 2 begins
Performance requirements:
1. where = 3000000 N or 3e6 N
2.
3.
4. AUV must completely enter the tunnel without contacting the barrier
5. Simulation time for Stage 1 alone should be between 0.1s to 0.5s
6. Total Simulation time including both stage 1 and stage 2 should be between 1.2s to 2s
7. 5% Settling time of all three outputs must be less than 1 second.
Requirements Passed:
• 5% Settling times: X - 0.927 seconds, Z - 0.45 seconds , - 0.81 seconds
• Input Control Signal: - 6e+5, - 2e+6, - 2.95e+6
• Stage 1 Simulation Time: 0.1 seconds
• All the estimated outputs converge to actual outputs
• Time of Convergence: X - 0.057 seconds, Z - 0.061 seconds , - 0.062 seconds
• Time Taken for AUV to Enter the Tunnel/Total Simulation Time: 1.3 seconds
% Problem 3b.
% Note that I actually use different augmented matrixes here for SUPERIOR
% estimation performance: one for pure open loop, and one for when the
% control signal is engaged. I understand this is not REQURIED, but in our
% case, the observer is greatly benefitted by knowledge on whether the
% control signal is engaged or not. We realize this concept via changing
% "A_bar", which this observer utilizes to better estimate our changed
% system parameters.
Y_Stage_one(:,6) = (Y_Stage_one(:,6)*pi/180);
X_Stage_one(:,12) = (X_Stage_one(:,12)*pi/180);
Table with outputs, output values and 5% Settling times for Stage One:
disp(T_Stage_one);
% Get the observer's final state estimations for transition to second stage
% these will be the "initial conditions" of the states at the beginning of
% the second stage:
State_Variable_Vector_obs_0_Stage_two = X_Stage_one(length(X_Stage_one(:,1)),:);
[Y_Stage_two,t_Stage_two,X_Stage_two] = initial(Stage_two_sys,
State_Variable_Vector_obs_0_Stage_two, 1.2); %simulate stage2 for 1.5s
Y_Stage_two(:,6) = (Y_Stage_two(:,6)*pi/180);
X_Stage_two(:,12) = (X_Stage_two(:,12)*pi/180);
% Calculating 5% Settling time for all three outputs of Stage two system
SimulationStuff1_Stage_two =
lsiminfo(Y_Stage_two(:,1),t_Stage_two,'SettlingTimeThreshold',0.05);
SimulationStuff2_Stage_two =
lsiminfo(Y_Stage_two(:,2),t_Stage_two,'SettlingTimeThreshold',0.05);
SimulationStuff3_Stage_two =
lsiminfo(Y_Stage_two(:,3),t_Stage_two,'SettlingTimeThreshold',0.05);
Table with outputs, output values and 5% Settling times for Stage Two:
disp(T_Stage_two);
Max_of_Thrust_X_T_net = max(CtrlThrust_net(:,1));
Max_of_Stern_Thrust_Z_s_net = max(CtrlThrust_net(:,2));
Max_of_Bow_Thrust_Z_b_net = max(CtrlThrust_net(:,3));
fprintf('<strong> Max Thrust X_T at Net Stage is: %6.f N or %.1e N </strong>',
Max_of_Thrust_X_T_net, Max_of_Thrust_X_T_net);
fprintf('<strong> Max Stern Thrust Z_s at Net Stage is: %6.f N or %.1e N </strong>',
Max_of_Stern_Thrust_Z_s_net, Max_of_Stern_Thrust_Z_s_net);
fprintf('<strong> Max Bow Thrust Z_b at Net Stage is: %6.f N or %.1e N </strong>',
Max_of_Bow_Thrust_Z_b_net, Max_of_Bow_Thrust_Z_b_net);
% Calculating 5% Settling time for all three outputs of Stage two system
SimulationStuff1_net = lsiminfo(Y_net(:,1),t_net,'SettlingTimeThreshold',0.05);
SimulationStuff2_net = lsiminfo(Y_net(:,2),t_net,'SettlingTimeThreshold',0.05);
SimulationStuff3_net = lsiminfo(Y_net(:,3),t_net,'SettlingTimeThreshold',0.05);
Time in sec at which estimated output theta converges to actual output theta is:
0.0620
% Since I am getting some repeated values for Y_net(:,1) and Y_net(:,2), therefore I
% cannot perform interpolation until I make my Y_net vector unique i.e
% remove the repeated elements
Table with Actual outputs, output values and 5% Settling times at Net of two Stages:
disp(T_net);
% Calculating 5% Settling time for all three estimated outputs of Stage two system
SimulationStuff1_net_estimated = lsiminfo(Y_net(:,4),t_net,'SettlingTimeThreshold',0.05);
SimulationStuff2_net_estimated = lsiminfo(Y_net(:,5),t_net,'SettlingTimeThreshold',0.05);
SimulationStuff3_net_estimated = lsiminfo(Y_net(:,6),t_net,'SettlingTimeThreshold',0.05);
Table with Estimated outputs, and 5% Settling times at Net of two Stages:
disp(T_net_estimated);
Output_Name Settling_Time_in_s
______________ __________________
plot(SimulationStuff1_net.SettlingTime, X_at_SettlingTime_net,'kO');
text(SimulationStuff1_net.SettlingTime, X_at_SettlingTime_net,['('
num2str(SimulationStuff1_net.SettlingTime) ',' num2str(X_at_SettlingTime_net) ')']);
plot(SimulationStuff2_net.SettlingTime, Depth_at_SettlingTime_net,'kO');
text(SimulationStuff2_net.SettlingTime, Depth_at_SettlingTime_net,['('
num2str(SimulationStuff2_net.SettlingTime) ',' num2str(Depth_at_SettlingTime_net) ')']);
plot(t_net(Converging_x_index), Y_net(Converging_x_index,1),'rO');
text(t_net(Converging_x_index), Y_net(Converging_x_index,1),['('
num2str(t_net(Converging_x_index)) ',' num2str(Y_net(Converging_x_index,1)) ')']);
plot(t_net(Converging_z_index), Y_net(Converging_z_index,2),'rO');
text(t_net(Converging_z_index), Y_net(Converging_z_index,2),['('
num2str(t_net(Converging_z_index)) ',' num2str(Y_net(Converging_z_index,2)) ')']);
vRefl=xline(tfinal_stage_one);
set(vRefl,'color','r','linestyle','--'); % Vertical Reference line where Stage 1 simulation
ends
plot(SimulationStuff3_net.SettlingTime, PitchAngle_at_SettlingTime_net,'kO');
text(SimulationStuff3_net.SettlingTime, PitchAngle_at_SettlingTime_net,['('
num2str(SimulationStuff3_net.SettlingTime) ',' num2str(PitchAngle_at_SettlingTime_net) ')']);
plot(t_net(Converging_theta_index), Y_net(Converging_theta_index,3),'rO');
text(t_net(Converging_theta_index), Y_net(Converging_theta_index,3),['('
num2str(t_net(Converging_theta_index)) ',' num2str(Y_net(Converging_theta_index,3)) ')']);
vRefl=xline(tfinal_stage_one);
set(vRefl,'color','r','linestyle','--'); % Vertical Reference line where Stage 1 simulation
ends
legend('Actual Pitch Angle (theta) in rad', 'Estimated Pitch Angle (theta) in rad',...
'5% Settling time Coordinates', 'Converging Point of theta');
xlim([0 t_net(length(t_net))]);
% ylim([-0.3 1]);
hold off
vRefl=xline(tfinal_stage_one);
set(vRefl,'color','r','linestyle','--'); % Vertical Reference line where Stage 1 simulation
ends
Once the LQI optimal state feedback gains is designed, we need to separate out the State Feedback gains G0 and
Integral Feedback gains GI
% % Problem 4a.
% Let's assume our Q_star (output weighing matrix) to be:
% Here Top left of the 9x9 matrix is the old Q (6x6) and bottom right is
% the Integrator Gains (3x3)
Q_star_lqi = [Q, zeros(6,3);...
zeros(3,6), 1e9*diag([3 500 755])];
Q_lqi = Q_star_lqi;
R_lqi = diag([1.5 0.1 0.05]); % Same as for LQR
% N = zeros(9, 3);
[K_lqi,S_lqi,P_lqi] = lqi(ol_sys, Q_lqi, R_lqi);
% where K_lqi contains both state feedback gain matrix and integral feedback gains, S is the
Riccati solution and P
% are the closed loop eigen values
State_Feedback_Gains = G0;
Integral_Feedback_Gains = GI;
The block diagram above represents the complete output feedback control system including integration of
reference tracking.
The 8 LTI objects above need to be defined before using APPEND and Connect functions.
Note:
Use CONNECT to properly connect all the blocks together by defining which outputs of the appended system are
connected to which inputs .
% % % Problem 4b.
% ====== Append all the lti objects to make on mega lti object ======
Q_connect = [1 2 3 4 5 6 7 8 9 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30;
28 29 30 28 29 30 1 2 3 13 14 15 16 17 18 4 5 6 7 8 9 19 20 21 22 23 24;
0 0 0 0 0 0 0 0 0 -1 -2 -3 0 0 0 0 0 0 0 0 0 0 0 0 25 26 27]';
In = [10 11 12];
Out = [1 2 3 10 11 12 28 29 30];
Requirements Passed:
• 5% Settling times: X - 0.92 seconds, Z - 0.35 seconds , - 0.33 seconds
• All the estimated outputs converge to actual outputs
• All actual outputs converge to the desired references with 0 steady state error within
• Time Taken for AUV to Enter the Tunnel/Total Simulation Time: 0.7 seconds
% Problem 4c.
% Because I did translation for all previous problems but we do not need it
% for this
State_Variable_Vector_0_lqi(4,1) = State_Variable_Vector_0_lqi(4,1) + 463;
State_Variable_Vector_0_lqi(5,1) = State_Variable_Vector_0_lqi(5,1) + 150;
Y_final_actual = Y_final_lqi(:,1:3);
Y_final_estimated = Y_final_lqi(:,4:6);
CtrlThrust_final_lqi = Y_final_lqi(:,7:9);
% Calculating 5% Settling time for all three actual outputs of final LTI
% system
SimulationStuff1_final_lqi =
lsiminfo(Y_final_actual(:,1),t_final_lqi,'SettlingTimeThreshold',0.05);
SimulationStuff2_final_lqi =
lsiminfo(Y_final_actual(:,2),t_final_lqi,'SettlingTimeThreshold',0.05);
SimulationStuff3_final_lqi =
lsiminfo(Y_final_actual(:,3),t_final_lqi,'SettlingTimeThreshold',0.05);
Table with actual outputs, output values and 5% Settling times for final LQI output feedback control
system with Integral Controller:
disp(T_final_lqi);
% Plotting
figure()
% Construct the 1st plot of just Positions in m
subplot(3,1,1)
plot(t_final_lqi,Y_final_actual(:,1));
grid on
hold on
plot(t_final_lqi,Y_final_actual(:,2));
plot(t_final_lqi,Y_final_estimated(:,1));
plot(t_final_lqi,Y_final_estimated(:,2));
plot(t_final_lqi,refrence_input(:,1));
plot(t_final_lqi,refrence_input(:,2));
title('Actual, Estimated Output Response and desired References of Position in m');
xlabel('Time (seconds)');
ylabel('Position (m)');
% xlim([0 3750]);
plot(SimulationStuff1_final_lqi.SettlingTime, X_at_SettlingTime_final_lqi,'kO');
text(SimulationStuff1_final_lqi.SettlingTime, X_at_SettlingTime_final_lqi,['('
num2str(SimulationStuff1_final_lqi.SettlingTime) ',' num2str(X_at_SettlingTime_final_lqi)
')']);
plot(SimulationStuff2_final_lqi.SettlingTime, Depth_at_SettlingTime_final_lqi,'kO');
text(SimulationStuff2_final_lqi.SettlingTime, Depth_at_SettlingTime_final_lqi,['('
num2str(SimulationStuff2_final_lqi.SettlingTime) ',' num2str(Depth_at_SettlingTime_final_lqi)
')']);
legend('Actual Position in X (x) in m', 'Actual Depth (z) in m',...
'Estimated Position in X (x) in m', 'Estimated Depth (z) in m',...
'Referenced Position in X (x) in m', 'Referenced Depth (z) in m',...
'5% Settling time Coordinates');
hold off
plot(SimulationStuff3_final_lqi.SettlingTime, PitchAngle_at_SettlingTime_final_lqi,'kO');
text(SimulationStuff3_final_lqi.SettlingTime, PitchAngle_at_SettlingTime_final_lqi,['('
num2str(SimulationStuff3_final_lqi.SettlingTime) ','
num2str(PitchAngle_at_SettlingTime_final_lqi) ')']);
legend('Actual Pitch Angle (theta) in rad', 'Estimated Pitch Angle (theta) in rad',...
'Referenced Pitch Angle (theta) in rad', '5% Settling time Coordinates');
% xlim([0 3750]);
% ylim([-0.3 1]);
hold off
% animate_auv(t,x,z,theta,savemovie);
animate_auv(t_final_lqi,Y_final_actual(:,1),Y_final_actual(:,2),Y_final_actual(:,3), 0);
title('Output Feedback Controller with Integral control:');
% In order to maximize the figure window in Windows
set(gcf, 'Units', 'Normalized', 'OuterPosition', [0, 0.04, 1, 0.96]);
Extra Credit
Performance requirements:
1. No requirement or limit on control signal but it should converge to 0 eventually.
2. All estimated outputs should converge to corresponding actual outputs.
3. All actual outputs should converge to the desired references with 0 steady state error and within the
trequired time limit
4. AUV must completely enter the tunnel without contacting the barrier
5. AUV must completely enter the tunnel with a tunnel height of 10.5m, which means that the AUV only have a
0.5m clearence since the AUV is 10m in height
6. Total Simulation time should be less than 2 sec i.e. the AUV should completely enter the tunnel in < 2 sec
7. 5% Settling time of all three outputs must be less than 1 second.
Requirements Passed:
• 5% Settling times: X - 0.92 seconds, Z - 0.35 seconds , - 0.33 seconds
• All the estimated outputs converge to actual outputs
• All actual outputs converge to the desired references with 0 steady state error within
• Time Taken for AUV to Enter the 10.5m Tunnel/Total Simulation Time: 0.7 seconds
% animate_auv(t,x,z,theta,savemovie);
animate_auv(t_final_lqi,Y_final_actual(:,1),Y_final_actual(:,2),Y_final_actual(:,3), 0,
10.5);
% In order to maximize the figure window in Windows
set(gcf, 'Units', 'Normalized', 'OuterPosition', [0, 0.04, 1, 0.96]);