i have problem with tuning pid 2dof on simulink
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
every time i try to run the tuning code i get this error but idk why
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1577077/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1577082/image.png)
TunedBlocks ={'PD1','PD2','PD3'};
ST0 = slTuner('Assem1',TunedBlocks);
addpoint={ST0,TunedBlocks};
addpoint={ST0,'Robot/qm'};
Refsignals ={...
'Assem1/invers/t1','Assem1/invers/t2','Assem1/invers/t3'};
addpoint={ST0,Refsignals};
controls =TunedBlocks;
Measurments ='Assem1/Robot/qm';
options= looptuneOptions('RandomStart',80','UseParallel',true);
TR=TuningGoal.StepTracking(Refsignals,Measurments,0.05,0);
ST1=looptune(ST0,controls,Measurments,TR,options);
writeBlockvalue(ST1);
0 Commenti
Risposte (1)
Shubham
il 17 Gen 2024
Hey Alaa,
It seems that you require help in tuning the Simulink model.
The warning message being produced indicates that the model "Assem1" does not exist. Since the “Assem1.slx” file is visible in the attached image, I would assume that the error is because the model is not loaded properly.
Please check that the model is present in the same directory as that of the MATLAB script you are using. Use the following command to open your model:
open_system('Assem1');
Please check that the syntax for adding the signal for analysis is incorrect. Try using the “addPoint” function:
addPoint(ST0, Refsignals);
Also note that the error while using the “looptune” is also linked to the previous warning. Since the model "Assem1" does not exist, the “slTuner” object cannot find any blocks to tune, which is required for the “looptune” command to work.
Please refer to the MathWorks documentation "slTuner Interface to Simulink Model" to configure the model:
Please refer to the following example for the "looptune" function.:
Hope this helps.
0 Commenti
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!