SMS: Optimal filtering