Miniaturized attitude control system for nanosatellites