BACKGROUND: Physical therapy interventions for ambulatory youth with cerebral palsy (CP) often focus on activity-based strategies to promote functional mobility and participation in physical activity. The use of activity monitors validated for this population could help to design effective personalized interventions by providing reliable outcome measures. The objective of this study was to devise a single-sensor based algorithm for locomotion and cadence detection, robust to atypical gait patterns of children with CP in the real-life like monitoring conditions. METHODS: Study included 15 children with CP, classified according to Gross Motor Function Classification System (GMFCS) between levels I and III, and 11 age-matched typically developing (TD). Six IMU devices were fixed on participant's trunk (chest and low back/L5), thighs, and shanks. IMUs on trunk were independently used for development of algorithm, whereas the ensemble of devices on lower limbs were used as reference system. Data was collected according to a semi-structured protocol, and included typical daily-life activities performed indoor and outdoor. The algorithm was based on detection of peaks associated to heel-strike events, identified from the norm of trunk acceleration signals, and included several processing stages such as peak enhancement and selection of the steps-related peaks using heuristic decision rules. Cadence was estimated using time- and frequency-domain approaches. Performance metrics were sensitivity, specificity, precision, error, intra-class correlation coefficient, and Bland-Altman analysis. RESULTS: According to GMFCS, CP children were classified as GMFCS I (n = 7), GMFCS II (n = 3) and GMFCS III (n = 5). Mean values of sensitivity, specificity and precision for locomotion detection ranged between 0.93-0.98, 0.92-0.97 and 0.86-0.98 for TD, CP-GMFCS I and CP-GMFCS II-III groups, respectively. Mean values of absolute error for cadence estimation (steps/min) were similar for both methods, and ranged between 0.51-0.88, 1.18-1.33 and 1.94-2.3 for TD, CP-GMFCS I and CP-GMFCS II-III groups, respectively. The standard deviation was higher in CP-GMFCS II-III group, the lower performances being explained by the high variability of atypical gait patterns. CONCLUSIONS: The algorithm demonstrated good performance when applied to a wide range of gait patterns, from normal to the pathological gait of highly affected children with CP using walking aids.