One of the most successful Motor Imagery classification methods is the Common Spatial Pattern algorithm, which is used as a feature generation method, combined with the Linear Discriminant Analysis classifier. CSP parameters are estimated via optimizing of a criterion implicitly connected to classification accuracy. Many modifications of CSP were proposed, but almost all of them just adjust an objective function in an optimization problem. Another extension is the Filter Bank CSP algorithm, which combines CSP features calculated in different frequency bands. So, parameters of such classification pipelines are estimated in two steps: 1) solving an optimization problem to generate features and 2) create a linear classifier based on these features. In this work, we propose to combine these two steps into a single optimization problem to build an FBCSP-like model.