Basic concepts for tidal volume and leakage estimation in non-invasive ventilation