comparison m-toolbox/m/mdcs/mdc1_UTN/plist_init.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 function varargout = plist_init(varargin)
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %
4 % DESCRIPTION - This function is intended for the generation of the plist to be used in the
5 % test_ltpda_acc_conv script for the testing of the conversion to
6 % acceleration scripts
7 %
8 % CALL
9 % [plHlfs, plHdf, plElAct, plThAct, plFreeDyn] = plist_init
10 %
11 %
12 % INPUT
13 % - 'SAVE' if you input save the function save the plists in the
14 % directory specified in 'DIR'
15 % - 'DIR' defines the directory for saving the plists files in .xml
16 % format the directory format is 'C:\Data\...\'
17 %
18 %
19 % OUTPUT
20 % - plHlfs low frequency suspension circuit continous transfer
21 % function
22 % - plHdf drag free circuit continous transfer function
23 % - plElAct list of parameters for the retarded electrical
24 % actuation
25 % - plThAct list of parameters for the thrusters retarded
26 % actuation
27 % - plFreeDyn list of parameters for the free dynamics
28 % calculation
29 %
30 %
31 %
32 % VERSION: $Id: plist_init.m,v 1.1 2008/05/27 09:49:37 anneke Exp $
33 %
34 %
35 % HISTORY: 23-04-2008 L Ferraioli
36 % Creation
37 %
38 %
39 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
40
41 %% Standard history variables
42
43 ALGONAME = mfilename;
44 VERSION = '$Id: plist_init.m,v 1.1 2008/05/27 09:49:37 anneke Exp $';
45 CATEGORY = '';
46
47 %% Finding inputs
48
49 saving = 0;
50 dir = 'C:\Dati\mock_data\plists\';
51
52 if length(varargin) > 0
53 for j=1:length(varargin)
54 if strcmp(varargin{j},'SAVE')
55 saving = 1;
56 end
57 if strcmp(varargin{j},'DIR')
58 dir = varargin{j+1};
59 end
60 end
61 end
62
63 %% Plists generation
64
65 % Continous transfer function of low frequency suspension the control circuit
66 NumHlfs = [-2.726e-007; 1.665e-005; 1.303e-007; 8.381e-010]; % Numerator
67 DenHlfs = [1; 0.2189; 0.01922; 0.0007803; 0]; % Denominator
68 tolHlfs = 1e-015; % Tolerance for the repeated roots
69
70 plHlfs = plist('NAME', 'Tfunc lfs circuit','NUMERATOR', NumHlfs, ...
71 'DENOMINATOR', DenHlfs, 'RRTOLERANCE', tolHlfs, 'FS', 10, 'OUTPUT_OPTION', 'RESIDUE', 'MODE', 'SYM');
72
73 % Continous transfer function of the drag free control circuit
74 NumHdf = [0.0004659; 0.1349; 4.37; 0.8304; 0.07449; 0.002978; 4.403e-005]; % Numerator
75 DenHdf = [1; 5.046; 9.609; 11.05; 0.01221; 3.401e-006; 0]; % Denominator
76 tolHdf = 1e-015; % Tolerance for the repeated roots
77
78 plHdf = plist('NAME', 'Tfunc df circuit','NUMERATOR', NumHdf, ...
79 'DENOMINATOR', DenHdf, 'RRTOLERANCE', tolHdf, 'FS', 10, 'OUTPUT_OPTION', 'RESIDUE', 'MODE', 'SYM');
80
81 % Parameters for the electrical actuation retarder response
82 tau_el = 0.01; % finite time response of the actuator in s
83 deltaT_el = 0.305; % Delay time introduced by the circuit in s
84 fs_el = 10; % data sampling frequency in Hz
85 tol_el = 1e-007; % Threshold for the filter length definition
86 Amp_el = 1; % Amplitude of the actuation response
87
88 plElAct = plist('NAME', 'electrical actuation parameters', 'TAU', ...
89 tau_el, 'DELTAT', deltaT_el, 'FS', fs_el, 'TOL', tol_el, 'AMP', Amp_el);
90
91 % Parameters for the thrusters actuation retarder response
92 tau_th = 0.1; % finite time response of the actuator in s
93 deltaT_th = 0.315; % Delay time introduced by the circuit in s
94 fs_th = 10; % data sampling frequency in Hz
95 tol_th = 1e-007; % Threshold for the filter length definition
96 Amp_th = 1; % Amplitude of the actuation response
97
98 plThAct = plist('NAME', 'thrusters actuation parameters', 'TAU', ...
99 tau_th, 'DELTAT', deltaT_th, 'FS', fs_th, 'TOL', tol_th, 'AMP', Amp_th);
100
101 % Free Dynamics Parameters
102 pstiff1 = -1.3e-006; % square of the parasitic stiffness on TM1
103 pstiff2 = -2e-006; % square of the parasitic stiffness on TM2
104 ctalk = -0.0001; % Cross talk coefficient
105
106 plFreeDyn = plist('NAME', 'Free Dyn Coeffs', 'pstiff1', pstiff1, ...
107 'pstiff2', pstiff2, 'cross_talk', ctalk);
108
109 %% Saving plists if required
110
111 if saving
112 save(plHlfs, [dir 'tf_coeffs_Hlfs_' date '.xml']);
113 save(plHdf, [dir 'tf_coeffs_Hdf_' date '.xml']);
114 save(plElAct, [dir 'el_act_params_' date '.xml']);
115 save(plThAct, [dir 'th_act_params_' date '.xml']);
116 save(plFreeDyn, [dir 'free_dyn_params_' date '.xml']);
117 end
118
119 %% Output plists
120
121 varargout{1} = plHlfs;
122 varargout{2} = plHdf;
123 varargout{3} = plElAct;
124 varargout{4} = plThAct;
125 varargout{5} = plFreeDyn;
126
127