next up previous
Naprej: Kaskadna regulacija Gor: Motnja v sistemu Nazaj: Motnja v sistemu

Enozan"cna regulacija

V sistem takoj po prvem procesu vpeljemo stopni"casto motnjo po"zenemo simulacijo.

program vaja2
" Enozan"cna regulacija z motnjo
"glavni regulator
CONSTANT Kp=3.89 , Ki=0.172, Kd=30.6 
Tt=0.1*Kd/Kp
r = 0.0
z = step(t, 3.0)

e = r - h3
Es=INTEG(e,0)
Udp=INTEG(Ud,0)
Ud=e*Kd/Tt - Udp/Tt
U=Kp*e+Ki*Es+Ud

" def.  drugega procesa
h3 = integ(h3d, 0)
h3d = fim - 20.0/100.0*h3
fim = integ(fimd, 0)
fimd = fi1*2.0/100.0 - 1.0/100.0*h3
" prvi proces
fi1 = fi1i + z
fi1i = integ(fi1d, 0)
fi1d = -1.0/5.*fi1i + 1.0/10.0*u


" priprava za opt.
krit=INTEG(t*ABS(e),0)

" sim.
constant Tkon=50
cinterval ci=0.1
termt (t.gt.Tkon)
prepar z, h3
output 10, z, h3
end


Leon Kos
Thu Feb 22 16:51:28 GMT+0100 1996