A method for controlling the inflation of an airbag, comprising: creating an artificial grid comprising a number of artificial grid points x, wherein each artificial grid point is a point in space with the same dimension as that of a number of feature vectors corresponding to a number of normal data samples being stored in a first database, wherein each feature vector of the number of feature vectors comprises a first number of features, and each feature vector being created from each normal data sample using a feature extraction algorithm, wherein the artificial grid is arranged such that no artificial grid point of the artificial grid is closer to origo than any of the number of feature vectors; training a classifier for each of the number of artificial grid points x by utilizing: the number of normal data samples and a trajectory extending from origo to each of the artificial grid points x wherein t denotes the points in the trajectory, resulting in a first set of trained classifiers; identifying a number of core action samples, which has corresponding feature vectors being created from each core action sample by using the feature extraction algorithm, wherein the feature vectors of the core action samples being differentiated from the feature vectors of the normal data samples, based on the first set of trained classifiers, and action data samples being stored in a second database; training a second classifier for separating the normal data samples from the core action samples by using the normal data samples and core action samples; detecting if a new data sample being received from a sensor is differentiated from the normal data samples by extracting a new feature vector from the new data sample and then applying the second trained classifier on the new feature vector; and if so, creating a control signal for controlling the inflation of an airbag. creating an artificial grid comprising a number of artificial grid points x, wherein each artificial grid point is a point in space with the same dimension as that of a number of feature vectors corresponding to a number of normal data samples being stored in a first database, wherein each feature vector of the number of feature vectors comprises a first number of features, and each feature vector being created from each normal data sample using a feature extraction algorithm, wherein the artificial grid is arranged such that no artificial grid point of the artificial grid is closer to origo than any of the number of feature vectors; training a classifier for each of the number of artificial grid points x by utilizing: the number of normal data samples and a trajectory extending from origo to each of the artificial grid points x wherein t denotes the points in the trajectory, resulting in a first set of trained classifiers; the number of normal data samples and a trajectory extending from origo to each of the artificial grid points x wherein t denotes the points in the trajectory, resulting in a first set of trained classifiers; identifying a number of core action samples, which has corresponding feature vectors being created from each core action sample by using the feature extraction algorithm, wherein the feature vectors of the core action samples being differentiated from the feature vectors of the normal data samples, based on the first set of trained classifiers, and action data samples being stored in a second database; training a second classifier for separating the normal data samples from the core action samples by using the normal data samples and core action samples; detecting if a new data sample being received from a sensor is differentiated from the normal data samples by extracting a new feature vector from the new data sample and then applying the second trained classifier on the new feature vector; and if so, creating a control signal for controlling the inflation of an airbag.