Model of brain rhythmic activity