# data[].attributes.body
clc
clear
s = %s
pi = %pi

Sp = 1 // setpoint
Max = 1.4 // valor maximo
Tp = 4 // tempo de pico (s)

Mp = (Max-Sp)/Sp
z = -log(Mp)/sqrt(pi^2 + log(Mp)^2)
wn = pi/(Tp * sqrt(1 - z^2))
Mf = wn^2/(s^2 + 2*z*wn*s + wn^2)

disp(Mf)

t = 0.:0.1:30
u = ones(t)
y = csim(u,t,Mf)
plot(t,y)

# data[].attributes.body
clear
clc

s = %s

//(valorMax - valorFinal)/valorFInal
up = (13.5-11)/11
zeta = - log(up)/sqrt(%pi^2+(log(up))^2)

disp (zeta)

wn = 3.4/sqrt(1-zeta^2)

disp (wn)

MF = 10* wn^2/(s^2 + 2*wn*zeta*s+wn^2)

t = 0.0:0.1:5

u = ones(t)

y = csim(u,t,MF)

plot(t,y)

# data[].attributes.body
clc;
clear all

s=%s;

MF= (2/(0.025*s+1))


t = 0.0:0.001:0.25

u = ones(t)

y = csim(u,t,MF)

plot(t,y)

# data[].attributes.body
0.6693246
---------------------------------
0.6693246 +0.4581454s +s²

# data[].attributes.body
2
-------------
1+0.025s

# data[].attributes.body
141.31122
---------------------------------
14.131122 +3.2069437s +s²

# data[].attributes.body
clc
clear all
s=%s;
pi = %pi
ts = 6;
mp = 0.3;
zeta = -log(mp)/sqrt(pi^2 + log(mp)^2)
wn = -log(0.02*sqrt(1-zeta^2))/(ts*zeta);
MF = wn^2/(s^2 + 2*zeta*wn*s + wn^2);
disp(MF)

Equação :

3.4368646
-------------------------
3.4368646 +1.3268471s +s²

# data[].attributes.body
clear
clc

s=%s;
mx=0.3503;
mn=0.2450;

tp=1;
UP=((mx-mn)/mn)*100;

x=log(UP/100);

zeta=-x/(sqrt((%pi^2)+x^2));

wn=(%pi)/(tp*(sqrt(1-(zeta^2))));

N=mn*wn^2;

D=s^2+2*zeta*wn*s+wn^2;

G1=syslin('c',N/D)
[z,p,k]=tf2zp(G1)
d=poly(p,'s')
disp(G1)

t=0.01:0.01:10;
x=size(t);
x=x(1,2);
u=ones(1,x);
y1=csim(u,t,G1);

2.5927594
-------------------------
10.582691 +1.6888896s +s²