Using the generateSi​mulationEn​semble in Predictive Maintenance Toolbox to generate a Time and Date

1 次查看(过去 30 天)
Hi,
I am using the generateSimulationEnsemble in the Predictive Maintenance Toolbox to generate failure data. What I would like to do is setup an independant variable for the date information, so everytime the simulation runs I'm able to record the time and date.
IGBT.IndependentVariables = "Date";
I wondered how (if it's possible) I may set this up so for each simulation run, it records the time and the date as an independant variable? This is my code so far that works and shows the position of the ensemble.IndependentVariables = "Date";
IGBT=[mdl '/IGBT Full1'];'RC';
for ct = numel(Bondwire):-1:1
tmp = Simulink.SimulationInput(mdl);
tmp = setVariable(tmp,'IGBT',Bondwire(ct));
simin(ct)=tmp;
end
% Specify a location for the generated data.
mkdir Data
location = fullfile(pwd,'Data');
[status,E] = generateSimulationEnsemble(simin,location,'UseParallel',true);
ensemble = simulationEnsembleDatastore(fullfile(pwd,'Data'));
ensemble.DataVariables = ["VCE", "SimulationInput"];
% ensemble.IndependentVariables = "Date";
ensemble.SelectedVariables = ["VCE";"SimulationInput"]
tall(ensemble)
Kind regards,
Andy

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Manage System Data 的更多信息

产品


版本

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by