get_state function

Get State at sampling time