AUVSim : Follow up on the 25-27th April classes
Required improvements
In order for AUVSim to be used by the largest number, it is required that the documentation is created. It has to be the most complete possible. The documentation has to be accessed directly through the model. For consistency with general Simulink documentation, it is proposed that to use the masking functionalities for subsystems and the attached documentation possibilities. Those will allow to access help files referenced with an URL by clicking on the Help button of the masked subsystem.
It is proposed that the help files are build using the following specifications:
· The documentation is based on an HTML arborescence. The arborescence of directories for documentation has to be the same as the arborescence in the model. To avoid problem with naming, subsystems and help html files have to follow the following convention :
· No space in the names
· Only letters and numbers are allowed
· All names start with an uppercase letter,
· Same case sensitive name is used for subsyteme and help file.
· Each subsystem created in the model has to have a corresponding documentation page which has the following architecture (a template file will be distributed):
· Description of the functionality (one line)
· Author, date of creation
· List of revisions with corresponding dates and authors
· Parent subsystem if any
· In depth description
· References if any with links
· Reference to source code if any with link
· Description of inputs and outputs (nature, continuous/discrete/sampling time, block/subsystem of origin (with link), block subsystems of destination (with link), size and description of individual inputs for vectorized I/O)
· Links to parent subsystem and child subsystem
· See also : link to any other relevant subsystem or Simulink block
· URL of the page
So far, no storage is provided by the AUVSim model. It is foreseen that all data of interested is included in TO blocks defined. To build the storage functionality, the idea is to use the TO/FROM blocks architecture. A subsystem is built at the 1st level (same level as dynamic model, environment, viewers…). It will multiplex all the FROM Blocks defined in the model and will output the timestamped values to the workspace, using the ‘To Workspace’ Block.
The second step is ensuring a permanent and traceable storage of the results on files. To ensure trace ability, it is important that the results of the simulation are stored with all relevant data. Those are :
· Name and date of last modification of model file
· Simulation parameters: duration, method used and step size
· Date and hour of the completion of the simulation
· All initial conditions
· Environment parameters
· AUV_model parameters
· Control Algorithm parameters
· Mission description or script if any
To be retrievable, the format of those data have to be based on detailed specifications although, they are appealed to change by nature.
Immediately, after a simulation all those data are available and could be stored together with simulation results in a Matlab structure, being itself store in a matfile. A possible solution achieve this to use scripting possibilities provided by Matlab: The simulation is launched from the script file and after completion of the simulation the script asks the user if he wants to store or discard the simulation data and under what name. The script creates the corresponding matfile. The drawback with this method is that Simulink GUI, interactivity is lost and for example, it is impossible to change the block parameters during the simulation or to stop it before the end. Also, no timer is provided during the simulation, it is therefore impossible to follow the progress of the simulation except if scopes are visible. No possibility to execute a script at the end of a simulation launched from the GUI has been identified so far.