next up previous
Naprej: Rezultati kaskadne regulacija Gor: Kaskadna regulacija Nazaj: Kaskadna regulacija

Simcos program

program vaja2b

" glavni regulator
CONSTANT Kp=4.96 , Ki=0.24, Kd=28.4 
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
constant kp1 = 2.0
fi1 = integ(fi1d, 0)
fi1d = -1.0/5.*fi1 + 1.0/10.0*e2*kp1
e2 = u - fi1

"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