主要内容

分析函数构造

分析架构选择设计方案或改进现有的设计。您可以使用与系统作曲家™架构模型分析功能进行系统分析和贸易研究。

一个分析功能MATLAB是一种®函数计算值必要评估架构的使用模型实例中每个元素的属性。

使用分析函数计算的结果分析,确定最优参数用于行为模型来模拟建筑系统。

在分析功能和建筑实例的更多信息,见分析架构

上卷分析四轴飞行器设计

使用上卷分析函数来计算总或平均模型元素属性值。使用原型模型元素分配属性。有关更多信息,请参见定义配置文件和刻板印象

在这个例子中,分析功能CostAndWeightRollupAnalysis计算模型中所有组件的总成本,是兼容的分析观众工具。

函数变长度输入宗量CostAndWeightRollupAnalysis(实例)% RobotPhysicalArchitecture分析功能。基金的例子%计算总价格如果instance.isComponent () & & ~ isempty (instance.Components)& & instance.hasValue (“SystemProfile.PhysicalElement.UnitCost”)sysComponent_unitPrice = 0;孩子= instance.Components如果child.hasValue (“SystemProfile.PhysicalElement.UnitCost”)comp_price = child.getValue (“SystemProfile.PhysicalElement.UnitCost”);sysComponent_unitPrice = sysComponent_unitPrice + comp_price;结束结束instance.setValue (“SystemProfile.PhysicalElement.UnitCost”,sysComponent_unitPrice);结束

这种分析函数遍历一个建筑实例。首先,sysComponent_unitPrice变量设置为0,这样每次分析来看,资金不能无限期的积累。检查每个组件实例UnitCost属性值。所有UnitCost属性值是总结和保存在sysComponent_unitPrice变量。最后,UnitCost房地产目前的组件实例的值更新sysComponent_unitPrice。有关更多信息,请参见写分析功能简单的上卷分析用机器人系统属性

在这个例子中,一个部分的分析功能calculateEndurance计算四轴飞行器使用组件实例属性的耐力。的耐力值然后设置计算架构的四轴飞行器的实例setValue函数。

如果payloadBatteryCapacity = = 0 totalPower = powerConsumption + hoverPower /效率;耐力=(电池容量/ 1000)/ (totalPower /电压)* 60;其他的payloadEndurance = (payloadBatteryCapacity / 1000) / (powerConsumption /电压)* 60;flightEndurance =(电池容量/ 1000)/ ((hoverPower /效率)/电压)* 60;如果flightEndurance < payloadEndurance耐力= flightEndurance;其他的耐力= payloadEndurance;警告(电子负载的忍耐力是有限的。”)结束结束instance.setValue (“AirVehicle.Endurance”、耐力)

和支持文件的更多信息,参见万博1manbetx使用四轴飞行器结构设计计算的耐力

基于类分析电池大小

使用MATLAB类分析函数来遍历一个对象,或类的实例化。

在这个例子中,类调用computeBatterySizing包括属性和方法用于分析功能computeLoad

classdefcomputeBatterySizing <处理属性totalCrankingInrushCurrent;totalCrankingCurrent;totalAccesoriesCurrent;totalKeyOffLoad;batteryCCA;电池容量;puekertcoefficient;结束方法函数obj = computeBatterySizing (obj) obj。totalCrankingInrushCurrent = 0;obj。totalCrankingCurrent = 0;obj。totalAccesoriesCurrent = 0;obj。totalKeyOffLoad = 0;obj。batteryCCA = 0;obj。batteryCapacity = 0; obj.puekertcoefficient = 1.2;结束函数obj =结果(obj) tempNumdaysToDischarge =(((obj.batteryCapacity / obj.puekertcoefficient) * 0.3) / (obj.totalKeyOffLoad * 1 e - 3)) / 24;disp (“总KeyOffLoad:”+ num2str (obj.totalKeyOffLoad) +“马”);disp (“天数KeyOffLoad所需30%的电池放电:“+num2str (tempNumdaysToDischarge) +“。”);disp (“总CrankingInRush电流:+ num2str (obj.totalCrankingInrushCurrent) +“一个”);disp (“总起动电流:+ num2str (obj.totalCrankingCurrent) +“一个”);如果(obj。totalCrankingCurrent > obj.batteryCCA) disp (“冷起动安培的指定的电池还不足以启动汽车0 f .”)其他的disp (“CCA指定的电池足以启动汽车(0 f .”)结束结束结束结束

和支持文件的更多信息,参见万博1manbetx电池大小和汽车电气系统分析

优化配置分析轮胎压力监测

functional-to-logical分配矩阵分配组件的功能体系结构组件的逻辑架构。覆盖率分析是最基本的形式的分析,确定是否所有的元素都已经被分配。

首先,打开项目对于这个示例。然后,负荷分配和收集场景。

scExampleTirePressureMonitorSystem allocSet = systemcomposer.allocation.load (“FunctionalAllocation”);场景= allocSet.Scenarios;

确认系统中每个函数分配。

进口systemcomposer.query。*;~,allFunctions =allocSet.SourceModel.find (HasStereotype (IsStereotypeDerivedFrom (“TPMSProfile.Function”)));unAllocatedFunctions = [];i = 1:元素个数(allFunctions)如果isempty (scenario.getAllocatedTo (allFunctions (i))) unAllocatedFunctions = [unAllocatedFunctions allFunctions (i)];结束结束如果isempty (unAllocatedFunctions)流(所有的功能都分配的);其他的流(% d函数没有被分配的元素个数(unAllocatedFunctions));结束
所有的功能分配

输出验证所有的功能分配。

和支持文件的更多信息,参见万博1manbetx分配在轮胎压力监测系统体系结构

剩余使用寿命分析移动机器人的设计

剩余使用寿命(原则)分析估计剩余时间在不同的子系统失败。我们的目标是预测维护,从而减少系统中断。

在这个例子中,分析功能scMobileRobotAnalysis是兼容的分析观众工具。

函数scMobileRobotAnalysis(实例,变长度输入宗量)ExpectedYearsBeforeFirstMaintenance = 2;如果~ instance.isArchitecture ()如果instance.hasValue (“HardwareBaseStereotype.Life”)生活= instance.getValue (“HardwareBaseStereotype.Life”);UsagePerDay = instance.getValue (“HardwareBaseStereotype.UsagePerDay”);UsagePerYear = instance.getValue (“HardwareBaseStereotype.UsagePerYear”);WillSurvive =生活> UsagePerDay * UsagePerYear * ExpectedYearsBeforeFirstMaintenance;instance.setValue (“HardwareBaseStereotype.ExceedExpectedMaintenance”,WillSurvive);结束结束结束

运行该分析功能之后,可以优化所需的第一个预计维修时间。每个组件的维修时间超过预期,在这种情况下设置为两年,是标记复选框。无节制的组件应该优化或替换更持久的部分。

和支持文件的更多信息,参见万博1manbetx定义的刻板印象和执行分析

变异分析胰岛素输注泵的设计

使用变异分析,选择一个最佳组合的变异与计算指标进行比较。

在这个例子中,分析功能OutcomeAnalysis用于确定最佳配置的胰岛素输注泵。这个函数不涉及独立分析分析观众工具。相反,分析函数使用迭代功能,可以直接从MATLAB命令窗口执行。

OutcomeAnalysis函数首先收集所有变体选择组件命名BGSensor

函数结果= OutcomeAnalysis () modelname =“InsulinInfusionPumpSystem”;therapyModel = systemcomposer.openModel (modelname);组件= therapyModel.Architecture.Components;idx = 1:元素个数(组件)如果比较字符串(组件(idx) . name,“泵”)泵=组件(idx) .getChoices;pumpNames = {};jdx = 1:元素个数(泵)pumpNames{结束+ 1}=泵(jdx) . name;结束elseif比较字符串(组件(idx) . name,“BGSensor”)=传感器组件(idx) .getChoices;sensorNames = {};jdx = 1:元素个数(传感器)sensorNames{结束+ 1}=传感器(jdx) . name;结束结束结束

分析函数然后收集所有变体组合迭代。

配置。传感器= sensorNames {1};配置。泵= pumpNames{1}; configs = {};idx = 1:元素个数(sensorNames)jdx = 1:元素个数(pumpNames)配置。传感器= sensorNames {idx};配置。泵= pumpNames{jdx}; configs{end+1} = config;结束结束

分析功能激活变异一个接一个地遍历模型属性,收集结果。设置变量的组合,OutcomeAnalysis使用setVariants函数。计算结果,OutcomeAnalysis使用computeOutcome函数。

结果= {};idx = 1:元素个数(配置)hOutcome = OutcomeContainer(配置{idx});therapyModel.iterate (“由上而下的”、@setVariants款{idx});therapyModel.iterate (“BottomUp”、@computeOutcome hOutcome);hOutcome。setWeights ([1 e-6 1 10 1 1000]”);结果{结束+ 1}= hOutcome;结束

最后,分析功能块的净结果显示优化设计选择。

属性= {胚根端胚乳的低,精度高的,更好的合规的,“早到市场”,“降低运营成本”};plotMatrix = 0(元素个数(结果),元素个数(属性));plotStrings = {};idx = 1:元素个数(结果)plotStrings {idx} = {idx} .Sensor[结果“+”结果{idx} .Pump];plotMatrix (idx 1) = 1 /(结果{idx} .NRE);plotMatrix (idx, 2) = {idx} .Accuracy结果;plotMatrix (idx, 3) = {idx} .Compliance结果;plotMatrix (idx 4) = 1 /(结果{idx} .TimeToMarket);plotMatrix (idx 5) = 1 /(结果{idx} .AnnualCost);结束colmin = 0 (1、5);colmax = max (plotMatrix);normalizedMatrix =重新调节(plotMatrix,“InputMin”colmin,“InputMax”colmax);如果存在(“spider_plot”)= = 2图=图;spider_plot (normalizedMatrix“AxesLabels”、属性“FillOption”,“上”,“FillTransparency”,0.1,“AxesDisplay”,“一个”);标题(sprintf (“贸易研究的结果”),“字形大小”14);传奇(plotStrings“位置”,“eastoutside”);pos = fig.Position;pos pos (2) = (2) - pos (4);pos (3) = 2 * pos (3);pos (4) = 2 * pos (4);fig.Position = pos;其他的瓦尔斯(normalizedMatrix, 2) / 5 =金额;x_labels =分类(plotStrings);h =酒吧(x_labels vals);标题(“净结果”);ax = h.Parent;ax.YLabel。字符串=“归一化单位”;结束

和支持文件的更多信息,参见万博1manbetx使用基于模型的系统工程设计胰岛素输注泵

另请参阅

|||||||||||

相关的话题