This is a mathematic representation of a dynamic system as a linear equation. Although there is no perfectly linear system in the real world, they work well enough as approximations and make calculations much, much easier
Vector x represents all possible states, or internal factors that could affect the system, like its current velocity, mass, etc.
There's no 1 size fits all solution for state, it depends on the system, like for our Vex robot the only 3 factors that matter are, position, velocity, and heading.
This can be different per system, for example in a mass/damper system the mass, and damping force need to be taken into account.
Vector u represents all inputs. These are all of the things you have control over, or more generally, all external forces acting on the system. Using the mass/damper system as an example if you have a force acting on the mass, F(t), that would be an input, because it is an external force acting on the system, affecting the system.
These are matrices that relate the variable they're next to how it changes over time, the first equation is known as the state equation, and the second as the output. The output isn't really useful for much, and C is generally the Identity matrix, while D is a matrix or vector and is usually just zeroes. This is because you generally want to observe the full state, and D = 0 means that inputs won't just instantly affect outputs. A, and B are a bit more complex and deserve their own section.
Lets say vector x has a length n, and vector u has a length m, matrix A (the state matrix) is of dimension n * n, while matrix B is of dimensions n * m.
So for this equation (the variables inside the vectors are arbitrary as this is just an example)
In the state matrix (A) each row and column corresponds to 1 input each. So 11 is how time affects p (or p/dt), but 12 is how v affects p in relation to time. (will be elaborated on later)
In the input matrix (B) each row and column corresponds to how the input affects the state in relation to time.
Now obviously A, and B can't just be 0's, we need to fill them up with actually useful information. Each entry to A shows how state contributes to the rate of change in the system, and in B entries show how inputs affect state. To fill a you solve differential equations in relation to time, I think the simplest way to understand this is to start with an arbitrary first order differential equation then work our way up.
Now onto systems of differential equations
Although these aren't very useful, so let's imagine a simple physical scenario of a mass damper. This mass damper has some force acting on it F(t) driving it forward. It also has a resistive damping force from the ground f. Before we get further I'll be using newtonian notation for this next part, if you do not know what that is it's pretty simple
So we know from Newton's 2nd law that F = ma, we already will have the mass, which to keep it general we'll call m for now. We also know the 2 forces acting on the mass, which is the resistive force, and F(t). We want the damping constant, which we'll call b to scale up with velocity, because this is how real friction works, so the greater your velocity increases the greater the resistive force is.
From that we can derive this equation
We can see the damping force subtracts from our forward force, accurately describing the forces. We also have to keep in mind the right hand side of the equation, which is mass * acceleration limiting this equation within physical bounds.
However this is a 2nd order differential equation, which is not only hard to solve, but not dealt with by State-Space, so how do we put this into state space? Well we have to separate out the states.
We need our variables to be actual measurable quantities, not derivatives, so we pick our 2 highest ones and try to step down, so velocity becomes position, and acceleration becomes velocity
This makes things really easy as we already have one of our equations, now we need to derive the other one.
Remember our equation from before? we need to rearrange that to get acceleration
If you've done polynomials before it's the same rules for standard form, and then we just keep inputs and state more distinct here. That's besides the point though, we've now finally arrived at the final equation to find acceleration so now we have our 2 equations (the 2nd one has some of the states subbed in but is equivalent to above)
Differential equations are a great way of representing dynamic systems, but are computationally hard, this gives us a computationally easy way to represent them linearly with matrices, a very easy (but tedious) and optimized problem in computer science.
We can use these states combined with laws of physics to actually create our modeling differential equations. This matrix form allows for much easier observation, stability analysis, and many control algorithms, like LQR, Kalman filters, and MPC.