state initalization function
function initst input Real pos; input Real fmax; input Real cycle; input Real V; output st out; end initst;