Analysis, Design Of Control Algorithms And Applications For Forward Invariance Of Hybrid Systems