void PID::checkParameters() {
    if (_dt <= 0.0) {
        throw std::domain_error("dt must be positive and non-zero");
    } else if (_Kp <= 0 || _Ki <= 0 || _Kd <= 0) {
        throw std::domain_error("gains must be positive and non-zero");
    }
}
