A computer-implemented method for calculating control variables of a vehicle comprising: - providing a dynamical model of the vehicle describing the vehicle dynamics, the dynamical model comprising state variables, the state variables comprising at least two variables ( β, r) representative of lateral motion of the vehicle and/or rotational motion of the vehicle, such at least two variables being function of lateral slip and/or longitudinal slip of one or more wheels of the vehicle; - acquiring input control variables based on controls ( s cmd, b cmd, t cmd) transmitted by a driver of the vehicle through control members (221, 222), the input control variables comprising at least a steering angle (δ cmd) of a wheel (103, 107) of the vehicle or an angular velocity (ω cmd) of such wheel (103, 107); - acquiring the state variables ( β, r) of the vehicle; - based on the acquired input control variables (δ cmd, ω cmd) and the acquired state variables ( β, r), calculating at least one output control variable (δ adas, ω adas) representative of the controls of the vehicle using model predictive control; wherein - calculating at least one output control variable (δ adas, ω adas) of the vehicle using model predictive control is based on the dynamical model of the vehicle, so as to minimize a cost function over a receding horizon using the acquired input control variables (δ cmd, ω cmd) as an input target while satisfying constraints; - the constraints including at least one driving envelope constraint for at least one wheel (103, 107) of the vehicle, - said at least one driving envelope constraint defining, for two parameters of said at least one wheel, an allowable two-dimensional domain within which slipping of the at least one wheel is considered allowable, such two parameters describing longitudinal slip and lateral slip of the at least one wheel; wherein acquiring input control variables (δ cmd, ω cmd) based on controls ( s cmd, b cmd, t cmd) transmitted by a driver of the vehicle through the control members (221, 222) comprises: - measuring a tire reaction torque τ r) of a wheel; - acquiring controls ( b cmd, t crnd) transmitted by a driver through throttle and brake pedals comprised in the control members (221, 222); and - based on the acquired controls ( b cmd, t cmd), on the measured tire reaction torque (τ r), and on a drivetrain model of the vehicle, calculating a commanded angular velocity (ω cmd) of a wheel. - providing a dynamical model of the vehicle describing the vehicle dynamics, the dynamical model comprising state variables, the state variables comprising at least two variables ( β, r) representative of lateral motion of the vehicle and/or rotational motion of the vehicle, such at least two variables being function of lateral slip and/or longitudinal slip of one or more wheels of the vehicle; - acquiring input control variables based on controls ( s cmd, b cmd, t cmd) transmitted by a driver of the vehicle through control members (221, 222), the input control variables comprising at least a steering angle (δ cmd) of a wheel (103, 107) of the vehicle or an angular velocity (ω cmd) of such wheel (103, 107); - acquiring the state variables ( β, r) of the vehicle; - based on the acquired input control variables (δ cmd, ω cmd) and the acquired state variables ( β, r), calculating at least one output control variable (δ adas, ω adas) representative of the controls of the vehicle using model predictive control; wherein - calculating at least one output control variable (δ adas, ω adas) of the vehicle using model predictive control is based on the dynamical model of the vehicle, so as to minimize a cost function over a receding horizon using the acquired input control variables (δ cmd, ω cmd) as an input target while satisfying constraints; - the constraints including at least one driving envelope constraint for at least one wheel (103, 107) of the vehicle, - said at least one driving envelope constraint defining, for two parameters of said at least one wheel, an allowable two-dimensional domain within which slipping of the at least one wheel is considered allowable, such two parameters describing longitudinal slip and lateral slip of the at least one wheel; - calculating at least one output control variable (δ adas, ω adas) of the vehicle using model predictive control is based on the dynamical model of the vehicle, so as to minimize a cost function over a receding horizon using the acquired input control variables (δ cmd, ω cmd) as an input target while satisfying constraints; - the constraints including at least one driving envelope constraint for at least one wheel (103, 107) of the vehicle, - said at least one driving envelope constraint defining, for two parameters of said at least one wheel, an allowable two-dimensional domain within which slipping of the at least one wheel is considered allowable, such two parameters describing longitudinal slip and lateral slip of the at least one wheel; - measuring a tire reaction torque τ r) of a wheel; - acquiring controls ( b cmd, t crnd) transmitted by a driver through throttle and brake pedals comprised in the control members (221, 222); and - based on the acquired controls ( b cmd, t cmd), on the measured tire reaction torque (τ r), and on a drivetrain model of the vehicle, calculating a commanded angular velocity (ω cmd) of a wheel.