function[state_eq, obser_eq, Nx, Ny, Nu, NparSys, Nparam, NparID, dt, Ndata, Nzi, izhf, ... t, Z, Uinp, param, parFlag, x0, iArtifStab, StabMat] = mDefCase10(test_case) % Definition of model, flight data, initial values etc. % test_case = 10 -- Unstable aircraft, short period, Equation decoupling method % variables: states - w, q % outputs - az, w, q % inputs - de % % test_case=10 is similar to the test_case = 8; except for multiplication of % Z and Uinp with eigTransf=exp(-0.7*t); % % Inputs % test_case test case number % % Outputs % state_eq function to code right hand sides of state equations % obser_eq function to code right hand sides of observation equations % Nx number of states % Ny number of observation variables % Nu number of input (control) variables % NparSys number of system parameters % Nparam total number of system and bias parameters % NparID total number of parameters to be estimated (free parameters) % dt sampling time % Ndata total number of data points for Nzi time segments % Nzi number of time segments (maneuvers) to be analyzed simultaneously % izhf cumulative index at which the maneuvers end when concatenated % t time vector % Z observation variables: Data array of measured outputs (Ndata,Ny) % Uinp input variables: Data array of measured input (Ndata,Nu) % param initial starting values for unknown parameters (aerodynamic derivatives) % parFlag flags for free and fixed parameters % x0 initial conditions on state variables % iArtifStab integer flag to invoke artificial stabilization % = 0: No artificial stabilization % > 0: Artificial stabilization (needs definition of StabMat) % StabMat artificial stabilization matrix; (Nx,Ny); nonzero only for iArtifStab>0 % % Constants d2r = pi/180; r2d = 180/pi; %---------------------------------------------------------------------------------------- %Model definition state_eq = 'xdot_TC10_uAC_EigT'; % function for state equations obser_eq = 'obs_TC08_uAC'; % function for observation equations Nx = 2; % Number of states Ny = 3; % Number of observation variables Nu = 1; % Number of input (control) variables NparSys = 6; % number of system parameters Nparam = NparSys; % Total number of system and bias parameters dt = 0.05; % sampling time iArtifStab= 0; % No artificial stabilization disp(['Test Case = ', num2str(test_case)]); disp('Unstable aircraft, short period, Eigenvalue Transformation') %---------------------------------------------------------------------------------------- % Load flight data for Nzi time segments to ba anylzed and concatenate load -ascii ..\flt_data\unStabAC_sim.asc; Nzi = 1; data = [unStabAC_sim]; % Number of data points Ndata1 = size(unStabAC_sim,1); izhf = [Ndata1]; Ndata = size(data,1); % Generate new time axis t = [0:dt:Ndata*dt-dt]'; % Eigenvalue transformation method sigmaT = 0.7; eigTransf=exp(-sigmaT*t); % Observation variables az, w q Z = [data(:,6).*eigTransf data(:,3).*eigTransf data(:,4).*eigTransf]; % Input variables de Uinp = [data(:,5).*eigTransf]; % Initial starting values for unknown parameters (aerodynamic derivatives) param = [-1.22871D+00; -1.47680; -4.20491D+00; ... 1.16197D-01; -2.70670D+00; -1.87718D+01 ]; % param = [-1.4249D+00-0.7; -1.47680; -4.20491D+00; ... % 1.16197D-01; -2.70670D+00; -1.87718D+01 ]; % Flag for free and fixed parameters parFlag = [1; 0; 1; ... 1; 1; 1]; % Total number of free parameters NparID = size(find(parFlag~=0),1); % Initial conditions p0, r0 x0 = [ 0.0; 0.0]; % Artificial stabilization matrix StabMat = zeros(Nx,Ny);