Hello! Welcome back to your course on multivariable control systems.
In our last lesson, we established a fundamental rule: the minimum number of state variables needed to describe a system equals its number of independent energy storage elements. This answered the question of "how many?" variables we need.
Today, we'll address the logical next step: "which ones?" Our goal is to select appropriate state variables for mechanical and electrical systems based on energy storage elements. By the end of this lesson, you'll have a clear, physically-grounded method for choosing the specific variables that form the state vector for a given system. This skill is the bridge between counting elements and writing down the actual equations of motion.
The Physics of State Variables
The state variables are not just abstract mathematical quantities; they represent the stored energy in the system. The most natural and common way to choose state variables is to pick the variables that directly appear in the energy equations for each storage element.
Mechanical Systems: Capturing Motion and Tension
For mechanical systems, we identified two types of energy storage elements: masses (kinetic energy) and springs (potential energy).
- Kinetic Energy (): The energy of a mass is determined by its velocity (). Therefore, the velocity of each independent mass is a natural choice for a state variable.
- Potential Energy (): The energy of a spring is determined by its displacement or deformation (). Therefore, the displacement of each independent spring is another natural choice.
Let's see this principle applied to a system with multiple components.
System Dynamics and Control: Module 27b - Choosing State Variables
We'll continue with the video 'System Dynamics and Control: Module 27b - Choosing State Variables' by Rick Hill. This section demonstrates how to select state variables for a two-mass system by looking at where energy is stored.
Please watch the segment from 04:27 to 09:22. Pay close attention to how the variables are chosen: velocities of the masses for kinetic energy, and the relative displacement (deformation) of the spring for potential energy.
As the video showed, for the two masses, the velocities and were chosen. For the spring connecting them, the state variable was its deformation, . This highlights an important point: for springs, the state variable is the change in length, which is what stores the energy.
This concept is also clearly laid out in the following text, which you can use as a quick reference.
The webpage 'Introduction: System Modeling' from the University of Michigan provides a concise explanation for the classic mass-spring-damper system.
Read the section titled 'Example: Mass-Spring-Damper System', down to just before 'Entering State-Space Models into MATLAB'. Note the paragraph that explicitly links position to potential energy and velocity to kinetic energy.
A Look Ahead: Rotational Systems and Your Pendulum Project
Your goal involves a rotary inverted pendulum, which is a rotational mechanical system. The same principles apply, with direct analogies:
| Translational | Rotational | Energy | State Variable |
|---|---|---|---|
| Mass () | Inertia () | Kinetic: | Angular Velocity () |
| Spring () | Torsional Spring () | Potential: | Angle / Angular Displacement () |
So, when we get to modeling your pendulum, you'll be choosing the angular velocities of the rotating parts and the angles of any flexible components (like a spring) as your state variables.
Electrical Systems: Voltage and Current
Your background in electrical engineering will make this section very familiar. The energy storage elements are inductors and capacitors.
- Magnetic Energy (): The energy in an inductor is determined by the current () flowing through it. Therefore, the current through each inductor is a state variable.
- Electric Energy (): The energy in a capacitor is determined by the voltage () across it. Therefore, the voltage across each capacitor is a state variable.
This gives us a simple, powerful rule:
For electrical circuits, choose the current through each inductor and the voltage across each capacitor as your state variables.
The following resource provides a clear walkthrough of this selection process for a circuit with multiple energy storage elements.
State-space model of an electric circuit - STEP BY STEP
This video, 'State-space model of an electric circuit - STEP BY STEP' from bioMechatronics Lab, quickly demonstrates the selection process for an electrical circuit.
Watch the segment from 00:17 to 02:13. Observe how the narrator immediately identifies the inductors and capacitor and assigns their respective currents and voltage as the state variables.
Notice the direct analogy to the mechanical case: velocity is a "through" variable like current, and displacement is an "across" variable like voltage. This correspondence is not just a coincidence; it reflects the fundamental mathematical structure shared by different physical domains.
You can also review this concept in the following text, which provides another excellent set of examples for all system types.
State Space Representations of Linear Physical Systems
The webpage 'State Space Representations of Linear Physical Systems' from Swarthmore College provides a great summary and further examples.
Skim through the sections 'Developing a state space model from a system diagram' for Mechanical Translating, Mechanical Rotating, and Electrical systems. Focus on the first paragraph of each section, where it explicitly states which variables to choose (e.g., 'extension of springs and the velocity of masses' or 'voltage across capacitors and current through inductors').
Test your understanding!
For the translational mechanical system shown in the image below (bottom diagram), identify the appropriate state variables based on the energy storage principles we've discussed.

Show answer
-
Identify Energy Storage Elements: The system has two masses, and , and two springs, and . Dampers and dissipate energy and do not define state variables. This means we need four state variables.
-
Select Variables for Masses (Kinetic Energy):
- Mass stores kinetic energy based on its velocity. Let's call its displacement , so its velocity is .
- Mass stores kinetic energy based on its velocity. Let's call its displacement , so its velocity is .
- So, two state variables are and (the velocities of the masses).
-
Select Variables for Springs (Potential Energy):
- Spring stores potential energy based on its compression/extension, which is the displacement of mass .
- So, a third state variable is (the displacement of mass ).
- Spring stores potential energy based on its relative displacement, which is the difference between the displacements of and .
- So, the fourth state variable could be chosen as the relative displacement . Alternatively, since we've already chosen as a state variable, we could simply choose as the fourth state variable. The deformation of spring can then be expressed using and . A common choice is to simply use the absolute positions of the masses.
Therefore, a perfectly valid set of four state variables is: , , , and .
Conclusion
You now have a robust and physically intuitive method for not only counting but also selecting the state variables for a system.
Key Takeaways:
- State variables are chosen based on the physical quantities that define the energy stored in a system's components.
- For Mechanical Systems:
- Mass/Inertia: Choose velocity / angular velocity.
- Spring/Torsional Spring: Choose displacement / angle (specifically, the deformation).
- For Electrical Systems:
- Inductor: Choose current.
- Capacitor: Choose voltage.
- This energy-based selection is the most common and standard approach, as it directly leads to physically meaningful state-space models.
In our next lesson, we will put this all together. You know how many variables to choose and which ones to choose. Now, we will derive the complete state-space models () from the system's differential equations.