Add sample initialization
This commit is contained in:
		
										
											Binary file not shown.
										
									
								
							| @@ -1,22 +1,24 @@ | |||||||
| function [sample] = initializeSample(args) | function [sample] = initializeSample(args) | ||||||
|  |  | ||||||
|     arguments |     arguments | ||||||
|  |         args.type char {mustBeMember(args.type,{'none', 'cylindrical'})} = 'none' | ||||||
|         args.H (1,1) double {mustBeNumeric, mustBePositive} = 350e-3 % Height [m] |         args.H (1,1) double {mustBeNumeric, mustBePositive} = 350e-3 % Height [m] | ||||||
|         args.R (1,1) double {mustBeNumeric, mustBePositive} = 350e-3 % Radius [m] |         args.R (1,1) double {mustBeNumeric, mustBePositive} = 110e-3 % Radius [m] | ||||||
|         args.m (1,1) double {mustBeNumeric, mustBePositive} = 1 % Mass [kg] |         args.m (1,1) double {mustBeNumeric, mustBePositive} = 1 % Mass [kg] | ||||||
|     end |     end | ||||||
|  |  | ||||||
|     sample = struct(); |     sample = struct(); | ||||||
|  |  | ||||||
|     switch args.type |     switch args.type | ||||||
|       case '0' |       case 'none' | ||||||
|         sample.type = 0; |         sample.type = 0; | ||||||
|       case '1' |         sample.m = 0; | ||||||
|  |       case 'cylindrical' | ||||||
|         sample.type = 1; |         sample.type = 1; | ||||||
|       case '2' |  | ||||||
|         sample.type = 2; |         sample.H = args.H; | ||||||
|       case '3' |         sample.R = args.R; | ||||||
|         sample.type = 3; |         sample.m = args.m; | ||||||
|     end |     end | ||||||
|  |  | ||||||
|     if exist('./mat', 'dir') |     if exist('./mat', 'dir') | ||||||
|   | |||||||
| @@ -210,15 +210,18 @@ Goal: validation of the concept | |||||||
| - Take into account disturbances, sensor noise, etc... | - Take into account disturbances, sensor noise, etc... | ||||||
| - Tomography + lateral scans (same as what was done in open loop [[file:~/Cloud/work-projects/ID31-NASS/phd-thesis-chapters/A4-simscape-micro-station/simscape-micro-station.org::*Simulation of Scientific Experiments][here]]) | - Tomography + lateral scans (same as what was done in open loop [[file:~/Cloud/work-projects/ID31-NASS/phd-thesis-chapters/A4-simscape-micro-station/simscape-micro-station.org::*Simulation of Scientific Experiments][here]]) | ||||||
|  |  | ||||||
| ** TODO [#A] Merge the micro-station model with the nano-hexapod model | ** DONE [#A] Merge the micro-station model with the nano-hexapod model | ||||||
| SCHEDULED: <2025-02-12 Wed> | CLOSED: [2025-02-12 Wed 12:10] SCHEDULED: <2025-02-12 Wed> | ||||||
|  |  | ||||||
| - [X] *Start from the Simscape model of the ID31 tests* | - [X] *Start from the Simscape model of the ID31 tests* | ||||||
|   =/home/thomas/Cloud/work-projects/ID31-NASS/phd-thesis-chapters/C5-test-bench-id31/matlab/nass_model_id31.slx= |   =/home/thomas/Cloud/work-projects/ID31-NASS/phd-thesis-chapters/C5-test-bench-id31/matlab/nass_model_id31.slx= | ||||||
| - [X] Remove LION metrology to have perfect measurement | - [X] Remove LION metrology to have perfect measurement | ||||||
| - [ ] Remove nano-hexapod model and add simplified model | - [X] Remove nano-hexapod model and add simplified model | ||||||
| - [ ] Add "cylindrical" payloads (configurable in mass) | - [ ] Add "cylindrical" payloads (configurable in mass) | ||||||
|  |  | ||||||
|  | ** TODO [#B] Add payload configurable subsystem | ||||||
|  | SCHEDULED: <2025-02-12 Wed> | ||||||
|  |  | ||||||
| ** TODO [#B] Discuss the necessity of estimated Rz? | ** TODO [#B] Discuss the necessity of estimated Rz? | ||||||
|  |  | ||||||
| One big advantage of doing the control in the cartesian plane, is that we don't need the estimation of nano-hexapod Rz, therefore we don't need the encoders anymore! | One big advantage of doing the control in the cartesian plane, is that we don't need the estimation of nano-hexapod Rz, therefore we don't need the encoders anymore! | ||||||
| @@ -364,7 +367,7 @@ initializeRy(); | |||||||
| initializeRz(); | initializeRz(); | ||||||
| initializeMicroHexapod(); | initializeMicroHexapod(); | ||||||
| initializeSimplifiedNanoHexapod(); | initializeSimplifiedNanoHexapod(); | ||||||
| % initializeSample('type', '0'); | initializeSample('type', 'cylindrical'); | ||||||
|  |  | ||||||
| initializeSimscapeConfiguration('gravity', false); | initializeSimscapeConfiguration('gravity', false); | ||||||
| initializeDisturbances('enable', false); | initializeDisturbances('enable', false); | ||||||
| @@ -1943,28 +1946,30 @@ function [nano_hexapod] = initializeSimplifiedNanoHexapod(args) | |||||||
| end | end | ||||||
| #+end_src | #+end_src | ||||||
|  |  | ||||||
| *** TODO [#A] =initializeSample=: Sample | *** =initializeSample=: Sample | ||||||
|  |  | ||||||
| #+begin_src matlab :tangle matlab/src/initializeSample.m :comments none :mkdirp yes :eval no | #+begin_src matlab :tangle matlab/src/initializeSample.m :comments none :mkdirp yes :eval no | ||||||
| function [sample] = initializeSample(args) | function [sample] = initializeSample(args) | ||||||
|  |  | ||||||
|     arguments |     arguments | ||||||
|  |         args.type char {mustBeMember(args.type,{'none', 'cylindrical'})} = 'none' | ||||||
|         args.H (1,1) double {mustBeNumeric, mustBePositive} = 350e-3 % Height [m] |         args.H (1,1) double {mustBeNumeric, mustBePositive} = 350e-3 % Height [m] | ||||||
|         args.R (1,1) double {mustBeNumeric, mustBePositive} = 350e-3 % Radius [m] |         args.R (1,1) double {mustBeNumeric, mustBePositive} = 110e-3 % Radius [m] | ||||||
|         args.m (1,1) double {mustBeNumeric, mustBePositive} = 1 % Mass [kg] |         args.m (1,1) double {mustBeNumeric, mustBePositive} = 1 % Mass [kg] | ||||||
|     end |     end | ||||||
|  |  | ||||||
|     sample = struct(); |     sample = struct(); | ||||||
|  |  | ||||||
|     switch args.type |     switch args.type | ||||||
|       case '0' |       case 'none' | ||||||
|         sample.type = 0; |         sample.type = 0; | ||||||
|       case '1' |         sample.m = 0; | ||||||
|  |       case 'cylindrical' | ||||||
|         sample.type = 1; |         sample.type = 1; | ||||||
|       case '2' |  | ||||||
|         sample.type = 2; |         sample.H = args.H; | ||||||
|       case '3' |         sample.R = args.R; | ||||||
|         sample.type = 3; |         sample.m = args.m; | ||||||
|     end |     end | ||||||
|  |  | ||||||
|     if exist('./mat', 'dir') |     if exist('./mat', 'dir') | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user