i keep geting this error Unable to resolve the name 'looptuneG​oal.StepTr​acking'. Error in PID (line 18) TR = looptuneGo​al.StepTra​cking(RefS​ignals, Measurements, 0.05, 0);

1 Ansicht (letzte 30 Tage)
TunedBlocks = {'PD1', 'PD2'};
ST0 = slTuner('DOF2_PD', TunedBlocks);
addPoint(ST0, TunedBlocks);
addPoint(ST0, 'robot/qm');
RefSignals = {'DOF2_PD/Signal Builder/q1', 'DOF2_PD/Signal Builder/q2'};
addPoint(ST0, RefSignals);
Controls = TunedBlocks;
Measurements = 'DOF2_PD/robot/qm';
options = looptuneOptions('RandomStart', 80, 'UseParallel', false);
TR = looptuneGoal.StepTracking(RefSignals, Measurements, 0.05, 0);
ST1 = looptune(ST0, Controls, Measurements, TR, options);
writeBlockValue(ST1);

Antworten (1)

R
R am 19 Apr. 2024
Hi,
I understand that you want to pass Design Goals, i.e., a TuningGoal object, into the "looptune" function. To create this TuningGoal object, you can use the "TuningGoal.StepTracking" function. Below are the changes you can make to your code to resolve the error:
TR = TuningGoal.StepTracking(RefSignals, Measurements, 0.05, 0);
ST1 = looptune(ST0, Controls, Measurements, TR, options);
Refer to the following documentations to understand about the "TuningGoal.StepTracking" function and other Tuning Goals supported by MATLAB:

Community Treasure Hunt

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

Start Hunting!

Translated by