Errors when trying to define Design Requirements in Control System Designer

I am trying to set Design Requirements in a Bode plot for a discrete time system in Control System Designer, but I am getting error messages in the main MATLAB window. I've verified that I can reliably reproduce the error messages very simply:
fs = 100;
dt = 1/fs;
sys = tf(1,1,dt);
controlSystemDesigner(sys)
Then add a new Bode plot (doesn't seem to matter which one). Right click in that new Bode plot and select Design Requirements > New…
It then outputs these error messages in the main MATLAB window:
Unable to resolve the name 'Constr.Ts'.
Error in controllib.chart.BodePlot/getNewConstraint (line 1480)
newConstraint.Requirement.setData('xData',(pi/Constr.Ts) * [0.01 0.1]);
^^^^^^^^^
Error in editconstr.NewRequirementDialog/settype (line 177)
newConstraint = getNewConstraint(this.Client,Type,this.Constraint);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in editconstr.NewRequirementDialog/setClient (line 109)
this.settype(this.List(1).Type);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in editconstr.NewRequirementDialog.getInstance (line 39)
inst.setClient(Client,ParentFig);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in ctrlguis.csdesignerapp.plot.internal.ResponsePlot/designConstr (line 395)
editconstr.NewRequirementDialog.getInstance(View,View.Parent);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in ctrlguis.csdesignerapp.plot.internal.ResponsePlot/createChart>LocalDesignConstr (line 133)
designConstr(Viewer,View,ActionType)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in ctrlguis.csdesignerapp.plot.internal.ResponsePlot/createChart>@(es,ed)LocalDesignConstr(this,hChart,'new') (line 58)
MenuSelectedFcn=@(es,ed) LocalDesignConstr(this,hChart,'new'));
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error using matlab.ui.internal.controller.WebMenuController/fireMenuSelectedEvent (line 78)
Error while evaluating Menu Callback.
Any idea what is going on and how I can fix it?
UPDATE: Walter's comment reminded me that I forgot to mention, I'm running MATLAB in Windows 11 Pro on a HP ZBook Fury 16 G10 Mobile Workstation.

댓글 수: 2

Datapoint:
I had to play around for a bit but I was eventually able to replicate this problem on MacOS 15.6 with R2024b.
Interesting that you had to play around a bit to replicate the problem. What did you have to change? Maybe I can use that to back out why I'm having a problem.

댓글을 달려면 로그인하십시오.

 채택된 답변

Andrew Ouellette
Andrew Ouellette 2025년 8월 12일
Hi @Jason,
This is a bug in the product. You should be able to change the line mentioned in this error from this:
Error in controllib.chart.BodePlot/getNewConstraint (line 1480)
newConstraint.Requirement.setData('xData',(pi/Constr.Ts) * [0.01 0.1]);
to this:
newConstraint.Requirement.setData('xData',(pi/newConstraint.Ts) * [0.01 0.1]);
and the requirement dialog will open correctly.
This issue will be fixed in a future release of MATLAB.

댓글 수: 1

Thank you! That worked perfectly after I figured out where to find and edit that file.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Get Started with Control System Toolbox에 대해 자세히 알아보기

제품

릴리스

R2024b

질문:

2025년 8월 6일

댓글:

2025년 8월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by