主要内容

Simulation of a Medical Device

This example shows how to conduct automated tests to model a medical device that analyzes biology samples. This example also requires a Stateflow® license.

客观的

The objective of medical device modeling is to assess the optimal dimensions of the sample area to maximize the number of samples analyzed by the device per hour.

Overview of System to Be Modeled

A medical device contains:

  • Samples to be analyzed

  • 试剂瓶

将要分析样品的小瓶加载在设备的左侧。试剂瓶在设备的右侧加载。

Process of Sampling for a Specific Test

  1. 样品与比色杯中的相应试剂混合。

  2. The mixture sits for a certain duration for the reagent to act on the sample.

  3. 为了读取混合物,该设备在混合物上发出激光。

See ''Automation Workflow Using Three Robot Arms'' to see how a medical device uses three robot arms to implement this process as an automated workflow.

Automation Workflow Using Three Robot Arms

  1. Robot arm 1 picks up a cuvette and places it in the testing area at the top.

  2. Robot arm 2 draws a sample and puts it into the cuvette.

  3. 为了创建要采样的混合物,机器人臂3绘制了与测试相对应的必需的试剂,并将其放入比色杯中。

  4. 混合物坐了很短的持续时间,使试剂能够在样品上作用。

  5. To take readings, the device shines a laser light on the mixture.

  6. The device discards the cuvette.

  7. This process is repeated until there are no more samples in the device.

医疗设备的模型:这是医疗设备的Simevents模型:

To modify the number of samples before starting to simulate, turn the knobs in the 'Samples' block.

  • A sample bay is a device that contains holders to hold samples. To specify the number of sample bays to use, turn the knob that changes the variable 'nSampleBays'.

  • 要指定样品舱可以采用的样品数量,请转动更改变量“ samplesperbay”的旋钮。

The Model Has Three Primary Elements:

  • 模型样本

  • 测试数据

  • Model animation The model runs the length of the specified samples and dimensions. The model animation visualizes the simulation and allows you to interact with the simulation.

Model Samples

The block labeled 'Samples' models the sample holding area. At simulation start, the reagents area is loaded with all the reagents. The cuvette area is loaded with cuvettes. The sample area is loaded with patient samples.

测试数据

'BioSampleAnalyzerData.xlsx' contains tests requested by patients. It contains these worksheets:

  • 'PatientTests' - Patient IDs and test IDs of the tests to be conducted.

  • 'TestData' - Details of each test. For each test ID it contains information about the amount of sample to be used (sampleAmount), the reagent to be used (reagentId), the amount of reagent to be used (reagentAmount), the priority for the test, and the amount of time the mixture must stay together (testTime) before taking a reading.

  • 'TestNames' - List of names for the reagents.

模型动画

To view and interact with the model using animation, click the switch on the 'Animation Switch' block. Clicking the switch 'On' opens the 'Hematology Diagnostic Instrument' window. If you do not use model animation, the example runs until the end.

“血液学诊断仪器”窗口包含:

  • Three robot arms at the top.

  • Time - which displays elapsed time.

  • Throughput - which displays the samples/hr of the device.

  • Cuvette area - where cuvettes are placed. The number of remaining cuvettes is shown at the top of the cuvette area.

  • 试剂区域 - 保留试剂的地方。试剂显示为蓝色圆圈。每个试剂圆的顶部显示试剂的缩写。每个圆的底部显示剩余试剂的量。当剩余试剂量低于3单位时,剩余的试剂量以红色显示。要补充试剂球,请单击它。当由于不足的试剂而跳过测试时,相应的试剂以黄色突出显示。

  • 样品区域 - 保留样品的地方。样品显示为粉红色球。每个样品圆的顶部显示testID。每个样本圆的右下都显示样本优先级;数字越低,优先级就越高。测试样品按顺序进行测试,最高优先级至最低优先级。如果样品正在等待试剂重新填充,则球会变黄。该模型跳过了采样并继续进行下一个样品,直到无法再继续进行。样品完成后,球会变成橙色。在每个样品列的底部是一个指示样品舱的数字。 To test all the samples in a bay, click the corresponding sample bay number.

Things to Try

  • Change the number of samples.

  • 配置Biotester块的参数。

  • 样本 - 更改样品区域的“样品舱数”和“每个湾的样品数量”。

  • 时机 - 更改时间相关值,例如机器人的速度和其他时间相关值。

  • Toggle the 'Animation Switch'.

  • Toggling the switch to 'Off' runs the simulation until all the samples are exhausted.

  • 在“动画开关”上切换“”上显示了动画窗口。在此模式下,您可以与模拟进行交互。要加载样品,请单击对应于样品舱的列底部的一个按钮之一。单击按钮时,从工作区变量“患者测试”中读取示例数据,并且海湾中的球中与按钮相对应的球填充了样本。您可以继续单击按钮。

评估最佳样品区域尺寸

医疗设备构建器的目标之一可能是确定为设备提供最佳吞吐量的样品区域尺寸。一个考虑因素是,增加样品区域的大小增加了机器人臂到达最远的样品所需的时间。减少样品区域的大小会减少机器人臂的行程。但是,加载所有示例托架,遵循设备初始化过程并打开设备所需的设置时间固定时间。此设置时间在所有样本中摊销。如果样本数量很少,则设置时间会增加整体吞吐量。

要找到最佳的样品区域尺寸,您可以使用不同的样本区域尺寸配置来模拟设备。脚本searchdim.m在所有可能的样本区域维度上执行搜索,并绘制每个样本区域维度的吞吐量。脚本将吞吐量计算为:

吞吐量=(样本数)/(完成样品的时间 * 3600)

以下图显示了运行此脚本的结果:

The first plot shows a Heat Map of throughput with 'samples per bay' along the horizontal and 'number of sample bays' along the vertical axis. The second plot shows a line plot of 'sample throughput' vs. 'number of samples'. As seen from these figures, the throughput for the dimensions corresponding to 6 bays and 9 samples per bay gives the highest throughput.

See Also

相关话题