## 1 Introduction  
Periodic components of brain signals and their frequency bands (_delta_ (1-3 Hz), _theta_ (4-8 Hz), _alpha_ (9-12 Hz), _beta_ (12-30 Hz), _gamma_ (\(>\)30 Hz)) are central to neuroscience basic research and clinical protocols [1; 2; 3]. Aperiodic components, initially disregarded in comparison to periodic ones as considered to be just background noise, represent a significant part of signals. They manifest with power spectral densities varying approximately as \(1/f^{\beta}\) and have been related to brain critical states [4; 5]. Recent studies have suggested that simultaneous changes in aperiodic and periodic brainwave components can underpin changes in functional and behavioural features, with broadband components modulated by task performance and correlated with neuronal spiking activity. Synchronization between different neuronal groups may also manifest within arrhythmic brain activity with no apparent periodicity [6; 7; 8; 9; 10; 11; 12; 13]. To keep pace with these findings, algorithms are being developed with the purpose of breaking complex electrophysiological signals down and transferring scientific findings into clinical practices [14; 15]. The issue of separating periodic and aperiodic components has also become increasingly relevant to the development of brain-machine interfaces [16]. Despite remarkable advances in the interpretation and quantification of neurological signals, several problems still remain unsolved, mainly related to the dynamics of brain at various scales [17]. In this work, a unified framework to quantify periodic and aperiodic power spectral components of electro- and magneto-encephalgrams is developed based on a _Markov-chain_ description. The power spectral density is estimated in terms of time sequences according to a statistical approach originally pioneered in the communication and information-theory context [18; 19; 20; 21; 22; 23; 24]. Line spectral components are generated by _Markov matrices_ corresponding to closed-loop sequences of firing neurons characterized by a set of heterogeneous states. The oscillatory frequencies, observed in the EEG and MEG from 0.5 Hz to 100 Hz, can be reproduced by closed loops involving a few hundred neurons down to a few neurons with firing intervals of the order of a few milliseconds. The closed loop operates as an electric circuit where the neuron behaves as a rectifying diode, producing unidirectional currents; the synapses act as dissipative elements and the ionic currents as current generators. The formation of closed loops dissipates the excess energy (heat) accumulated in an active region of the brain by the local increase in circulating blood. A realistic description of the neurological signals requires bunches of synchronized sequences of closed loops of firing neurons spontaneously formed in regions of high density, where neurons are connected to thousands of other neurons nearby, that, if in a critical state, may be simultaneously fired. The impulse generated by the bunch of syncronized sequence is represented by a Gaussian time function. The width of the Gaussian is related to the duration of the impulse emitted by the bunch and, in turn, to the characteristic cut-off filtering out the harmonic components of the power spectrum at high frequency. The amplitude of the Gaussian depends on the number of syncronized loops \(N_{i}\). By taking into account the fluctuations in \(N_{i}\) in the Markov-chain model, a mixed power spectrum is obtained where lines and continuous spectral components co-exist. It is shown that the broadband component causes the line amplitude to change (while its frequency remains unchanged, being only dependent on the reciprocal duration of the loops) and the distortion of the signal is consistent with what is observed in the empirical EEG and MEG records. This distortion affects the lowest rather than the highest frequency components: thus, _delta waves_ with harmonics at frequencies lower than the cut-off are more distorted than _gamma waves_.