Closed Thread
Results 1 to 1 of 1

Thread: OR Rebreather Model Sim

  1. #1
    Andrey Prokopenko Faceless is a name known to all Faceless is a name known to all Faceless is a name known to all Faceless is a name known to all Faceless is a name known to all Faceless is a name known to all Faceless is a name known to all Faceless is a name known to all Faceless is a name known to all Faceless is a name known to all Faceless is a name known to all Faceless's Avatar
    Join Date
    May 2006
    France, Castelnau-Le-Lez


    OR Rebreather Model Sim

    OR Rebreather Model Simulation – How To!
    By Faceless


    For running this program you will need MatLab version 7 or higher with Similink and Real Time workshop toolbox options and some decent PC ( 1.5 GHz and 512 Mb Ram or better. Unlike consumer oriented flash presentations and other similar programs this simulation is the first one first being made on a such solid mathematical and engineering basic, thus operating as close to real life as possible.

    To use program , first unpack scripts from the archive into some folder at your hard drive.

    Next start Matlab, change current folder to the one where script named main_RB_TB.m is being located. It’s supposed to be within GUI_Sim2a_060525/RB_TB_script folder. It's the main script to start entire simulation. You may either right-click on it and select "Run" from the drop down menu or just select it and press F5.

    After a while (or maybe a little longer if your PC isn’t so modern) a screen like shown below should appear:

    It’s a main user interface screen. Basically it looks like a set of various controls placed around central part, emulating output from the user display.

    To make it more realistic, see below a photo showing Proto III Handset

    In order to make it look more similar to real device user display view area is divided into two regions: first showing handset output, and second one designated to the text area, reporting current state of the system, allowing user read announces, notes on the current state of the system, recommendations, warnings etc. Just to the left side of the text area there are two colour quadrates, they will emulate colour LED giving you warning about current PPO2 and CO2 levels.

    If they’re glowing green then levels are within normal limits, yellow means “warning”, and red obliviously means “uh-oh” J Once again In real word these LEDs will be placed at mouthpiece, to allow you have easy control over the situation. Remember the motto “Know your PPO2 at all times!” That’s the case. Knowing CO2 is even better because CO2 hit is not a good thing underwater as well.

    First thing to set is to select gas mix you‘ll going to “dive” with. Emulation allows you to have up to three gas mixes onboard and easily switch between them at the start and during the dive. I’ll explain it later. Right now just enter reasonable values of Oxygen, Helium, as well as size of your virtual tank and pressure in it into “Dil gas mix 1”, “Dil gas mix 2” and “Dil gas mix 3” field sets depending on your wishes. There is no need to enter Nitrogen it will be calculated automatically depending on the O2 & He values you‘ve entered.

    If you want to use just one mix, fill only one set. To switch between mixes use drop-down list named “Gas mix” located just below the button with “->” sign. Please note that emulation will try to make airbreaks to save diver from oxtox, but beside of this it has no “fool protection” against using wrong mixes for wrong deeps for example diving beyond allowed 1.6 PPO2 limit. Of course oxygen LED’s will go red but it’s only emulation so no counteractions against wrong profiles in dive emulation is being taken whatsoever.

    Self-test & Pre-dive Checks

    Did you noticed two big buttons marked with <- and -> arrows below the text screen? These are controls emulating left and right buttons on the real handset. Right after the start of the simulation text area will show that the system is ready to start self-testing. Try to press on the button marked -> as suggest the text area and you will see screen blinking with phrases like “Standby Current 4 mA”, “Battery voltages”, “O2 Sensor Voltages” etc.

    After a while text area will change readings to the text below: “<- Pre-dive Options ->”. This means that system has passed some internal self-testing.

    If you press button with <- arrow then some funny texts sequence pretending like you’re making some pre-dive checks (like negative pressure, loop filling with O2 then purging it with diluent) imitating pre-dive checks will appear. Just keep pressing button with -> arrow till you‘ll see text like “Breathe loop before dive <- Dive Now Options ->”. Press <- button, text will disappear, and now you’re ready to “dive”

    In emulation the purpose of self-test & pre-dive stage is aimed on to have you feel like system is making some real checks, but actually it’s unnecessary. Since its emulation only, all the sensors and controllers are just mathematical models thus are being reset into their initial state within less than one second. So in this emulation you may easily skip both self-test & pre-dive stages completely this stage at the future, it won’t affect emulation in any way. Just DON'T do that in real life, never ever.

    Starting & Suspending & Resetting Simulation

    Entire simulation workflow process is being driven by three big buttons, currently active button is highlighted with lighter colour:

    Run button start entire simulation, press it to start “dive” after setting initial parameter, also it resumes simulation put into Pause more.

    Reset buttons means reinitialize simulation to the initial conditions, i.e. immediately setting surface level, zero deco obligation, full O2 & diluent cylinders, no failures. It doe not reset any base parameters, like available gas mixes, RMV (respiratory minute volume), tidal volume, so don’t worry about them.

    Pause button suspends simulation for a while. It’s very convenient, for example first you suspend the simulation next, and you change depth speed and press Run button. Simulation will resume with newly set descent speed. Another useful way suspending simulation is to set some point where simulation should to pause. It can be done two ways: either setting desired depth, or point in time. Type of pause conditions is defined by two radio buttons to the left. Don't leave both radio buttons checked at once, choose either depth or time, then enter desired value.

    For example: let’s assume you want to descent to 20 meters and then hover there. No problem, before starting simulation, set depth to 20 meters like shown on the screen below, then start or resume simulation.

    Choosing Simulation Speed

    Generally speaking, this simulation can run in two modes: real-time and so called accelerated one.

    Real time is more resource greedy because model performs full set of necessary calculations each second then updates Handset with calculated values, like it would in real life. On contrary accelerated mode calculates only key points in dive profile, it is mush less accurate although still completely valid. To just play with possible situations accelerated mode is useful, but if you want more precise output values, real-time mode is a preferred one.

    Also, don’t forget that you may easily switch between accelerated and real-time modes.

    For example: here is a step-by step instruction on how to simulate dive on air to 55 meters with 20 min bottom time and very fast descent:
    1. Set gas mix to air (21%O2, 0% He) set descent speed to 30, and pause conditions to depth and 55 meters. Start simulation by pressing Run button.
    2. When sim will go to pause after reaching 55 metres depth, set desc speed to 0, switch to accelerated mode, change pause conditions to time and set time to 20 minutes then press “Run” button again.
    3. When system will calculate necessary amount of steps and go to Pause again, change dive input to "deco" and hit Run button again.

    How to Change Current Depth/ Use Dive Profiles in Simulation

    This emulation has three possible dive modes; choice is being made in “Depth input” control set. There are three radio buttons named Profile, Manual and Deco.

    Profile Mode - This mode allows you to emulate dive using some existing profile data. If you choose this option, then you may select profile from drop down list of the existing profiles. This list is situated at the upper right part of the screen

    If you want to see what does currently selected profile look like, press “plot” button, and in new window you will see picture showing depth/time graph for the profile you choose.

    Manual Mode - When this mode is being selected after dive simulation has started you may imitate any diving profile you want, i.e. submerge to 40 metres with given speed, shay there for 20 minutes, then go to surface with or even without deco. Once again, its simulation so manually flying it is not “fool-proof”. Of course in manual mode you must control descent or ascent speed somehow. For this purpose two control sliders are provided. Desc/asc slider allows you to change current desc/asc speed, positive value means descent, negative ascent.

    To use it, depth input mode control must be set to “rate”, like shown on the screenshot below

    Another way of setting current depth is direct entry of current depth value. You may do so by using another control.

    For using it you will need to switch depth input mode control to “depth”.

    Beware, changing depth this way unlike changing it with desc/asc speed alteration in this simulation means instant “teleporting” to depth. In my opinion it’s pretty stupid & useless but who knows …

    Deco Mode - This mode is mainly useful to imitate ascent with all required deco stops. For example: at the beginning of the dive simulation you have made fast descent to 45 meters, spent about 15 minutes there and now you want to reach surface as soon as possible. To do so, fly simulation in manual mode, next when bottom time will reach 15 minutes, press “Pause ” button, switch depth input to deco and press “Run” button.

    How to Plot Results

    Sometimes it’s useful to see how particular parameter is being changed over time in visual manner. This simulation has the ability to log parameters change during simulation into two-dimensional matrixes, then plot them on graphs. To accomplish this, before hitting “Run” button, you must select which parameters to log. You may choose several parameters at once.

    Next, after simulation has been started, you may at any point of time suspend it by pressing Pause button, and conveniently examine data logged from start dive up to last point of time pressing “plot” to the right of each log type.

    Setting Fault Modes

    This simulation has unique ability to allow user enter some predefined fault modes and check model reaction on introducing them.

    Adding them during dive is pretty straightforward: put simulation into Pause, choose appropriate fault form drop-down list, then press Run button to resume simulation. You may introduce any number of faults during simulation in any sequence but no more than one at once.

    Discuss this article
    Last edited by Louby Lou; 22nd November 2006 at 18:39.

Closed Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts