Adaptive Hybrid System Framework for Unified Impedance and Admittance Control