Common Gain Function

Added switch for MS & SPP in main and Simulink model.