The somatic nervous system is located in the peripheral nervous system and primarily controls voluntary muscle movements and sensory perception.