Trying to Plot feedback system

4 Ansichten (letzte 30 Tage)
random1072
random1072 am 15 Okt. 2020
Beantwortet: Star Strider am 15 Okt. 2020
I am trying to plot my g in order to show the overshoot I am getting however I keep getting an error everytime I try to plot and not sure why. I already found my values just cannot plot.
g_0 = tf([20],[1,8,32,20]);
stepinfo(g_0)
g_1 = tf([40],[1,8,32,40]);
stepinfo(g_1)
g_2 = tf([60],[1,8,32,60]);
stepinfo(g_2)
g_3 = tf([70],[1,8,32,70]);
stepinfo(g_3)
g_4 = tf([77],[1,8,32,77]); % K of 77 give overshoot just under 16%
stepinfo(g_4)
g_5 = tf([78],[1,8,32,78]); % K of 78 gives overshoot just above 16%
stepinfo(g_5)
%Interpolate to get exact K value = 16% = 77.66181431
g= tf([77.6618143],[1,8,32,77.6618143]) % K is just over overshoot of 17%
stepinfo(g)
step(g)

Antworten (1)

Star Strider
Star Strider am 15 Okt. 2020
The image is a bit difficult to read. The error appears to be thrown with the step call. This may likely be due to your having named a variable ‘step’.
Run this from a script or your Command Window:
which step -all
if the first entry is:
step is a variable.
you have found the problem. The solution is to name it something else that is relevant in the context of your code.
If that is not the problem, please provide more details.

Kategorien

Mehr zu Graphics Performance finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by