Automatic detection of ineffective triggering and double triggering during mechanical ventilation