Optimizing hip and knee assistance for walking and sit-to-stand transitions: an intrinsic muscle mechanics based predictive approach