Monday 19 April 2021

Design & Simulation of Oxygen Concentrator device coupled to a lung model.

 This example models an oxygen concentrator device coupled to a lung model. One of the two sieves filters out nitrogen from the air to produce concentrated oxygen in the product tank. The two sieves switches periodically so that while one sieve is filtering, the other can purge the adsorbed nitrogen. When the lung model inhales, some of the oxygen-rich gas from the product tank is mixed into the inspiratory flow.

This model shows one use case of modifying the default properties in the Moist Air Properties (MA). The default "dry air" has been replaced with oxygen and the default "trace gas" has been replaced with nitrogen. This way, the Controlled Trace Gas Source (MA) block can be used to remove "trace gas" (i.e., nitrogen) from the flow through the sieve.

The lungs are represented by a Translational Mechanical Converter (MA), which converts pressure into translational motion. By setting the Interface cross-sectional area to unity, displacement in the mechanical translational network becomes a proxy for volume changes, force becomes a proxy for pressure, spring constant becomes a proxy for respiratory elastance, and damping coefficient becomes a proxy for respiratory resistance.

The device has two modes of operation: continuous or pulsating. The simulation starts in continuous mode, which delivers constant oxygen-rich flow to the lung model. At t = 70 s, the simulation switches to pulsating mode, which synchronizes oxygen delivery with inspiration. State Flow™ is used to estimate the breaths per minute and to control the conserving valve in the device.


Speed Cruise Control System Using Simulink® and Stateflow®

v  This model shows the code generated for a Speed Cruise Control Controller subsystem.

Airport Conveyer Belt Control System

This model shows how to generate code for an airport conveyer belt controller. 

Design & Simulation of Fuel Tank Filling Station Using MATLAB Simulink

Description

This example shows a hybrid system with both continuous time and discrete event sections. The discrete event part models tanks, represented by entities, which are being queued and need to be filled up. Each tank has a "Capacity" attribute. The continuous time part models the process of filling up a tank, modeled by an Integrator. When a tank is filled to capacity, this event can be detected by a Hit Crossing block, which will generate a message corresponding to this event. The generated message will trigger the server to release the tank.

Structure of the Model

The model includes the following components:

  • Tank Generator: Generates tanks periodically with each tank having an arbitrarily assigned Capacity attribute.

  • Waiting Queue: Queues tanks waiting to be filled

  • Fill This Tank: Serves tanks and calls into the Simulink Function startFilling to pass the tank's capacity attribute to the time-based section of the model.

  • Tank Filling: Models the process of filling each tank up to capacity

  • Sensor: Detects when the amount filled in the tank has reached capacity and when this happens, sends a message to the discrete-event section of the model. Sensor serves as a bridge between the time-based section and even-based section.

  • Processor: Receives message generated from the Sensor and decides which tank to be released from the Server. It then calls the Simulink Function named release to generate a release message for a specific tank.

  • Selection Gate: Receives a release message, and in response, opens the gate to let the specific tank through.

  • Configure Demo: Sets the number of gas pumps in the gas station and turns on/off of the animation. To show the animation, please use a gas pump number between 1 and 20.

Domain Crossings Between Time Domain and Event Domain

SimEvents automatically handles any exchange of data across the time and event domains by automatically inserting gateways where needed. These positions are annotated in the model using E. In this model, a gateway has been inserted at the input port of the Entity Queue block that is connected to the Hit Crossing block since it receives a message from the time domain section of the model.

Results

The Scope block labeled "Fill Process" and "Trucks leaving after fill" shows the results of the simulation.

If Show Animation check box is selected in Configure Demo, an animation window appears for visualizing the demo. A screenshot of the animation with four gas pumps is shown below:


Design & Simulation of a Medical Device _Hematology Diagnostic Instrumen...

·         This example shows how to conduct automated tests to model a medical device that analyzes biology samples. A medical device contains:·         Samples to be analyzed ·         Reagent bottles

The vials that hold the samples to be analyzed are loaded on the left side of the device. The reagent bottles are loaded on the right side of the device.

Design & Simulation of Medical Ventilator with Lung Model_ Using MATLAB ...


This example models a positive-pressure medical ventilator system. A preset flow rate is supplied to the patient. The lungs are modeled with the Translational Mechanical Converter (MA), which converts moist air pressure into translational motion. By setting the Interface cross-sectional area to unity, displacement in the mechanical translational network becomes a proxy for volume, force becomes a proxy for pressure, spring constant becomes a proxy for respiratory elastance, and damping coefficient becomes a proxy for respiratory resistance.

The exchange of oxygen and carbon dioxide in the moist air mixture is not currently modeled.

Uploaded Matlab Videos