Modelling the EEG with nonlinear dynamics