function state = initialRS(P, Sw, Cs, Cb) state.p = P; state.sw = Sw; state.cs = Cs; state.cb = Cb;