ArticleslgStudy

science

Common spatial pattern

Common spatial pattern is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Common spatial pattern rather than just read about it. In short: Common spatial pattern (CSP) is a mathematical procedure used in signal processing for separating a multivariate signal into additive subcomponents which have maximum differences in variance between two windows. Details Let 𝐗1 of size (n,t1) and 𝐗2 of size (n,t2) be two windows of a multivariate signal, where n is the number of signals and t1 and t2 are the respective number of samples.

Common spatial pattern — main illustration
Common spatial pattern — illustration

Key takeaways

  • Common spatial pattern belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Common spatial pattern to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Common spatial pattern from memory before moving on to harder problems.

Reference excerpt

Common spatial pattern (CSP) is a mathematical procedure used in signal processing for separating a multivariate signal into additive subcomponents which have maximum differences in variance between two windows.

Details Let 𝐗1 of size (n,t1) and 𝐗2 of size (n,t2) be two windows of a multivariate signal, where n is the number of signals and t1 and t2 are the respective number of samples. The CSP algorithm determines the component 𝐰T such that the ratio of variance (or second-order moment) is maximized between the two windows:

𝐰=arg⁡max𝐰‖𝐰𝐗1‖2‖𝐰𝐗2‖2 The solution is given by computing the two covariance matrices:

𝐑1=𝐗1𝐗1Tt1 𝐑2=𝐗2𝐗2Tt2 Then, the simultaneous diagonalization of those two matrices (also called generalized eigenvalue decomposition) is realized. We find the matrix of eigenvectors 𝐏=[𝐩1⋯𝐩n] and the diagonal matrix 𝐃 of eigenvalues {λ1,⋯,λn} sorted by decreasing order such that:

𝐏T𝐑1𝐏=𝐃 and

𝐏T𝐑2𝐏=𝐈n with 𝐈n the identity matrix. This is equivalent to the eigendecomposition of 𝐑2−1𝐑1:

𝐑2−1𝐑1=𝐏𝐃𝐏−1 𝐰T will correspond to the first column of 𝐏: 𝐰=𝐩1T

Discussion

Relation between variance ratio and eigenvalue The eigenvectors composing 𝐏 are components with variance ratio between the two windows equal to their corresponding eigenvalue:

𝝀i=‖𝐩iT𝐗1‖2‖𝐩iT𝐗2‖2

Other components The vectorial subspace Ei generated by the i first eigenvectors [𝐩1⋯𝐩i] will be the subspace maximizing the variance ratio of all components belonging to it:

Ei=arg⁡maxE(minp∈E‖𝐩T𝐗1‖2‖𝐩T𝐗2‖2) On the same way, the vectorial subspace Fj generated by the j last eigenvectors [𝐩n−j+1⋯𝐩n] will be the subspace minimizing the variance ratio of all components belonging to it:

Fj=arg⁡minF(maxp∈F‖𝐩T𝐗1‖2‖𝐩T𝐗2‖2)

Variance or second-order moment CSP can be applied after a mean subtraction (a.k.a. "mean centering") on signals in order to realize a variance ratio optimization. Otherwise CSP optimizes the ratio of second-order moment.

Choice of windows X1 and X2 The standard use consists on choosing the windows to correspond to two periods of time with different activation of sources (e.g. during rest and during a specific task). It is also possible to choose the two windows to correspond to two different frequency bands in order to find components with specific frequency pattern. Those frequency bands can be on temporal or on frequential basis. Since the matrix 𝐏 depends only of the covariance matrices, the same results can be obtained if the processing is applied on the Fourier transform of the signals. Y. Wang has proposed a particular choice for the first window 𝐗1 in order to extract components which have a specific period. 𝐗1 was the mean of the different periods for the examined signals. If there is only one window, 𝐑2 can be considered as the identity matrix and then CSP corresponds to Principal component analysis.

Relation between LDA and CSP Linear discriminant analysis (LDA) and CSP apply in different circumstances. LDA separates data that have different means, by finding a rotation that maximizes the (normalized) distance between the centers of the two sets of data. On the other hand, CSP ignores the means. Thus CSP is good, for example, in separating the signal from the noise in an event-related potential (ERP) experiment because both distributions have zero mean and there is no distinction for LDA to separate. Thus CSP finds a projection that makes the variance of the components of the average ERP as large as possible so the signal stands out above the noise.

Applications The CSP method can be applied to multivariate signals in generally, is commonly found in application to electroencephalographic (EEG) signals. Particularly, the method is often used in brain–computer interfaces to retrieve the component signals which best transduce the cerebral activity for a specific task (e.g. hand movement). It can also be used to separate artifacts from EEG signals. CSP can be adapted for the analysis of the event-related potentials.

See also Blind signal separation

References

Illustrations

Common spatial pattern: Two sets of overlapping data used to illustrate how CSP can separate the data.
Two sets of overlapping data used to illustrate how CSP can separate the data.
Common spatial pattern: Two sets of data after rotation by CSP to maximize the ratio of the variances along the two axes.
Two sets of data after rotation by CSP to maximize the ratio of the variances along the two axes.

Worked examples

Example 1 — a first encounter with Common spatial pattern

Start with the simplest possible case. Write down what Common spatial pattern claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Common spatial pattern before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Common spatial pattern ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Common spatial pattern

In research
Common spatial pattern appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Common spatial pattern in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Common spatial pattern is common in secondary-school and first-year university syllabi. It links to neighbouring topics Signal processing, so understanding it makes those chapters shorter.
In everyday life
Look for Common spatial pattern outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Common spatial pattern” →

How to study Common spatial pattern in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Common spatial pattern means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Common spatial pattern out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Common spatial pattern in simple terms?

Common spatial pattern (CSP) is a mathematical procedure used in signal processing for separating a multivariate signal into additive subcomponents which have maximum differences in variance between two windows. Details Let 𝐗1 of size (n,t1) and 𝐗2 of size (n,t2) be two windows of a multivariate…

Why does Common spatial pattern matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Common spatial pattern?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Common spatial pattern.

Tags

  • Signal processing

Keep exploring