% AT STEP 61: CALCULATES SISO FIR MODEL FOR CV ASVSTPSGCC FROM MV/DV From21HA110

% MATLAB SCRIPT STARTS .......

FIR_ASVSTPSGCC_From21HA110_uraw = [226737 226735 226725 226728 226729 226728 226726 226725 226724 226723 226722 226721 226720 226719 226718 226717 226716 226716 226715 226715 226715 226715 226715 226716 226717 226718 226718 226720 226721 226722 226724 226726 226728 200258 196855 191298 185224 189167 193910 199013 202741 207856 212321 214749 215457 216846 219399 221774 222659 224221 225864 227615 228525 230132 230628 230042 229650 230583 231280 231743 231524 231517 ]';
FIR_ASVSTPSGCC_From21HA110_yraw = [1.51125 1.51121 1.51117 1.51115 1.51115 1.51117 1.5112 1.51126 1.51131 1.51138 1.51147 1.51155 1.51162 1.5117 1.51176 1.51181 1.51185 1.51188 1.5119 1.51191 1.5119 1.51188 1.51185 1.5118 1.51173 1.51165 1.51157 1.51145 1.51135 1.51123 1.51109 1.51094 1.51077 1.54429 1.59048 1.68178 1.75977 1.84317 1.90861 1.95847 1.98694 2.00607 2.00916 2.0007 1.9855 1.97905 1.96275 1.9416 1.90546 1.86172 1.81887 1.77109 1.73446 1.69766 1.66139 1.63409 1.61419 1.59486 1.58084 1.56857 1.55692 1.54943 ]';
FIR_ASVSTPSGCC_From21HA110_yfilt = [1.51125 1.51121 1.51117 1.51115 1.51115 1.51117 1.5112 1.51126 1.51131 1.51138 1.51147 1.51155 1.51162 1.5117 1.51176 1.51181 1.51185 1.51188 1.5119 1.51191 1.5119 1.51188 1.51185 1.5118 1.51173 1.51165 1.51157 1.51145 1.51135 1.51123 1.51109 1.51094 1.51077 1.54429 1.59048 1.68178 1.75977 1.84317 1.90861 1.95847 1.98694 2.00607 2.00916 2.0007 1.9855 1.97905 1.96275 1.9416 1.90546 1.86172 1.81887 1.77109 1.73446 1.69766 1.66139 1.63409 1.61419 1.59486 1.58084 1.56857 1.55692 1.54943 ]';
FIR_ASVSTPSGCC_From21HA110_u = [226735 226725 226728 226729 226728 226726 226725 226724 226723 226722 226721 226720 226719 226718 226717 226716 226716 226715 226715 226715 226715 226715 226716 226717 226718 226718 226720 226721 226722 226724 226726 226728 200258 196855 191298 185224 189167 193910 199013 202741 207856 212321 214749 215457 216846 219399 221774 222659 224221 225864 227615 228525 230132 230628 230042 229650 230583 231280 231743 231524 231517 ]';
FIR_ASVSTPSGCC_From21HA110_y = [1.51121 1.51117 1.51115 1.51115 1.51117 1.5112 1.51126 1.51131 1.51138 1.51147 1.51155 1.51162 1.5117 1.51176 1.51181 1.51185 1.51188 1.5119 1.51191 1.5119 1.51188 1.51185 1.5118 1.51173 1.51165 1.51157 1.51145 1.51135 1.51123 1.51109 1.51094 1.51077 1.54429 1.59048 1.68178 1.75977 1.84317 1.90861 1.95847 1.98694 2.00607 2.00916 2.0007 1.9855 1.97905 1.96275 1.9416 1.90546 1.86172 1.81887 1.77109 1.73446 1.69766 1.66139 1.63409 1.61419 1.59486 1.58084 1.56857 1.55692 1.54943 ]';
FIR_ASVSTPSGCC_From21HA110_ymod = [1.51121 1.51122 1.51123 1.51125 1.51127 1.51128 1.5113 1.51132 1.51134 1.51136 1.51138 1.5114 1.51143 1.51145 1.51148 1.5115 1.51152 1.51154 1.51156 1.51158 1.5116 1.51161 1.51162 1.51163 1.51164 1.51164 1.51164 1.51164 1.51163 1.51162 1.51095 1.51078 1.54429 1.59048 1.68178 1.75977 1.84317 1.90861 1.95847 1.98694 2.00607 2.00916 2.0007 1.9855 1.97905 1.96275 1.9416 1.90546 1.86172 1.81887 1.77109 1.73446 1.69766 1.66139 1.63409 1.61419 1.59486 1.58084 1.56857 1.55692 1.54943 ]';
FIR_ASVSTPSGCC_From21HA110 = [-1.26158e-006 -2.84749e-006 -5.83438e-006 -7.77989e-006 -9.88238e-006 -1.14578e-005 -1.32275e-005 -1.45759e-005 -1.61009e-005 -1.72628e-005 -1.83542e-005 -1.92266e-005 -2.0526e-005 -2.13895e-005 -2.21387e-005 -2.22964e-005 -2.24125e-005 -2.26403e-005 -2.28235e-005 -2.32481e-005 -2.35455e-005 -2.36507e-005 -2.39298e-005 -2.42652e-005 -2.44853e-005 -2.47974e-005 -2.52129e-005 -2.55582e-005 -2.59572e-005 3.91753e-005 7.29856e-005 7.72095e-005 8.0269e-005 8.23116e-005 8.35449e-005 8.40378e-005 8.39836e-005 8.34039e-005 8.2454e-005 8.11695e-005 7.9672e-005 7.79931e-005 7.62978e-005 7.45609e-005 7.27971e-005 7.10342e-005 6.93672e-005 6.78651e-005 6.64654e-005 6.5149e-005 6.39509e-005 6.296e-005 6.20913e-005 6.1275e-005 6.05685e-005 6.00498e-005 5.97385e-005 5.9454e-005 5.90782e-005 5.8724e-005 ]';
FIR_ASVSTPSGCC_From21HA110_u_wndw0 = [226735 226725 226728 226729 226728 226726 226725 226724 226723 226722 226721 226720 226719 226718 226717 226716 226716 226715 226715 226715 226715 226715 226716 226717 226718 226718 226720 226721 226722 226724 226726 226728 200258 196855 191298 185224 189167 193910 199013 202741 207856 212321 214749 215457 216846 219399 221774 222659 224221 225864 227615 228525 230132 230628 230042 229650 230583 231280 231743 231524 231517 ]';
FIR_ASVSTPSGCC_From21HA110_y_wndw0 = [1.51121 1.51117 1.51115 1.51115 1.51117 1.5112 1.51126 1.51131 1.51138 1.51147 1.51155 1.51162 1.5117 1.51176 1.51181 1.51185 1.51188 1.5119 1.51191 1.5119 1.51188 1.51185 1.5118 1.51173 1.51165 1.51157 1.51145 1.51135 1.51123 1.51109 1.51094 1.51077 1.54429 1.59048 1.68178 1.75977 1.84317 1.90861 1.95847 1.98694 2.00607 2.00916 2.0007 1.9855 1.97905 1.96275 1.9416 1.90546 1.86172 1.81887 1.77109 1.73446 1.69766 1.66139 1.63409 1.61419 1.59486 1.58084 1.56857 1.55692 1.54943 ]';
FIR_ASVSTPSGCC_From21HA110_ymod_wndw0 = [1.51121 1.51122 1.51123 1.51125 1.51127 1.51128 1.5113 1.51132 1.51134 1.51136 1.51138 1.5114 1.51143 1.51145 1.51148 1.5115 1.51152 1.51154 1.51156 1.51158 1.5116 1.51161 1.51162 1.51163 1.51164 1.51164 1.51164 1.51164 1.51163 1.51162 1.51095 1.51078 1.54429 1.59048 1.68178 1.75977 1.84317 1.90861 1.95847 1.98694 2.00607 2.00916 2.0007 1.9855 1.97905 1.96275 1.9416 1.90546 1.86172 1.81887 1.77109 1.73446 1.69766 1.66139 1.63409 1.61419 1.59486 1.58084 1.56857 1.55692 1.54943 ]';
figure(1)
subplot(2,1,1)
plot(FIR_ASVSTPSGCC_From21HA110_uraw)
grid
xlabel('From21HA110 raw data');
title('Data for ASVSTPSGCC and From21HA110');
subplot(2,1,2)
plot([FIR_ASVSTPSGCC_From21HA110_yraw FIR_ASVSTPSGCC_From21HA110_yfilt])
grid
xlabel('ASVSTPSGCC raw and filtered');
figure(2)
subplot(3,1,1)
plot(FIR_ASVSTPSGCC_From21HA110_u)
grid
xlabel('From21HA110');
title('Modeling ASVSTPSGCC from steps in From21HA110');
subplot(3,1,2)
plot([FIR_ASVSTPSGCC_From21HA110_y FIR_ASVSTPSGCC_From21HA110_ymod])
grid
xlabel('ASVSTPSGCC measured and model');
subplot(3,1,3)
plot(FIR_ASVSTPSGCC_From21HA110)
xlabel('Step response');

figure(3)
subplot(2,1,1)
plot(FIR_ASVSTPSGCC_From21HA110_u_wndw0)
grid
xlabel('From21HA110');
title('Data window #1: Modeling ASVSTPSGCC from steps in From21HA110');
subplot(2,1,2)
plot([FIR_ASVSTPSGCC_From21HA110_y_wndw0 FIR_ASVSTPSGCC_From21HA110_ymod_wndw0])
grid
xlabel('ASVSTPSGCC measured and model');

% MATLAB SCRIPT ENDS .......

