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

1 Ansicht (letzte 30 Tage)
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

Antworten (0)

Kategorien

Mehr zu Manage System Data finden Sie in Help Center und File Exchange

Produkte


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by