Why do the Control System Designer and "step" function give different outputs for a step response?

10 visualizzazioni (ultimi 30 giorni)
I am creating a transfer function model using the "tf" function in the Control Systems Toolbox in MATLAB R2022b.  If I obtain a step response for the transfer function using 1) the "step" function and 2) the Control System Designer App, the two step responses do not match.
My workflow looks like this:
%Define numerator and denominator coefficients of the transfer function
numerator = [0 1.05 1.68 0.1575 0];
denominator = [1 1.96 1.1004 0.1372 0.0985];
transfer_fn = tf(numerator,denominator);
step(transfer_fn) %This gives the step response plot
controlSystemDesigner(transfer_fn) %One of the resulting plots is a step response, which is different from the "step" function output
The "step" function and the Control System Designer outputs look like this respectively:
Is this a bug in either the "step" function or Control System Designer? Is there a workaround for this issue?

Risposta accettata

MathWorks Support Team
MathWorks Support Team il 16 Ago 2023
Though the outputs do not match, this is not a bug. The Control System Designer seems to act differently because it computes the response assuming a specific controller architecture. This architecture can be edited in the "Edit Architecture" dropdown menu in the toolstrip of the Control System Designer. By default, the controller architecture is a closed loop system as shown in the image below:
Thus, the step response plotted in Control System Designer is the response of the system with the feedback loop as shown in the image above.
 To get open loop response for the transfer function, please follow the steps listed below: 
 
1) The step response plot is for “IOTransfer_r2y”. Find the label "IOTransfer_r2y" in the "Responses" list on the bottom left of the Control System Designer window and double-click on it. The screenshot below shows where the label "IOTransfer_r2y" is located: 
2) Double-clicking on the label will open up another window. In this window, open the loop “ym” by adding it to “Compute input/output response with the following loops open” list as shown in the screenshot below:
3) Then click "OK". This closes the window.
Now, the step response in the Control System Designer is updated and it should be identical to the response obtained using the "step" function. 
 

Più risposte (0)

Prodotti


Release

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by