next up previous
Naprej: Optimizacija Gor: Enozan"cna reglacija Nazaj: Diferencialni del ragulatorja

Simcos program

program vaja2

" glavni regulator
CONSTANT Kp=4.0 , Ki=0.18, Kd=33.0 
Tt=0.1*Kd/Kp
r=STEP(t,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 = integ(fi1d, 0)
fi1d = -1.0/5.*fi1 + 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 r, h3
output 10, r, h3
end



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