{"id":83,"date":"2024-08-16T16:37:17","date_gmt":"2024-08-16T16:37:17","guid":{"rendered":"https:\/\/libraryresources.nse.org.ng\/robotics\/chapter\/chapter-11\/"},"modified":"2026-03-16T14:23:31","modified_gmt":"2026-03-16T14:23:31","slug":"chapter-11","status":"publish","type":"chapter","link":"https:\/\/libraryresources.nse.org.ng\/robotics\/chapter\/chapter-11\/","title":{"raw":"State Space Modeling","rendered":"State Space Modeling"},"content":{"raw":"<div>[latexpage]<\/div>\n<div><\/div>\n<div>State space is an important tool for effective control. The capability of modeling a system using the state space is an important skill to control the system. The conversion of a real-world system to state space is the first step in the process of modeling of a system. Overall, modeling the system can provide insights into the system behavior. The system dynamics can be revealed through the modeling process. Hence, the modeling process can enhance our understanding of the underlying system.<\/div>\n<div><\/div>\n<div><\/div>\n<div>Modeling of the underlying system typically starts with the understanding the nature of the system.\u00a0 All systems have effort and flow.\u00a0 For a mechanical system, we need to understand the force and torque (effort), as well as position and speed (flow) of the system.\u00a0 Similarly, for a electrical system, we must understand the voltage (effort) and current (flow) relationships of different components of the circuit in order to provide insights into how the circuit should work.<\/div>\n<div><\/div>\n<div><\/div>\n<h1><strong>1) Modeling of <\/strong><strong>Mechanical System State Space<\/strong><\/h1>\n<div><\/div>\n<div>Modeling a mechanical system is useful for understanding the interactions between the components. These interactions can be considered states. State space is particularly good at capturing such trivial relationships between the state variables. An example of the mechanical state space is illustrated through the following example, shown in Figure 11.1.<\/div>\n<div><\/div>\n<div>\n\n[caption id=\"attachment_75\" align=\"aligncenter\" width=\"481\"]<img class=\"wp-image-75\" src=\"https:\/\/libraryresources.nse.org.ng\/wp-content\/uploads\/sites\/18\/2024\/08\/chp21-300x211.png\" alt=\"The graph shows you an example of diagram of the mechanical system to show you the process of deriving state space. \" width=\"481\" height=\"339\"> Figure 11.1: The overview of the mechanical system for state space modeling[\/caption]\n\n<\/div>\n<div><\/div>\n<div><\/div>\n<div>\n\nIn this example, the image shows a mechanical system with two masses, M1 and M2, shown in Figure 11.1. The two masses are connected to a spring and damper. An external force F(t) is imposed on the system. Based on the system, there are two states, X1 and X2, shown in Figure 11.2. The two states are correlated. <span style=\"text-align: initial;font-size: 1em\">Object 1 is associated with position X1, and object 2 is associated with position X2. The modeling process starts with analysis of M1 and M2.\u00a0 M1 is associated with two different motions: X1 on the left, and both X1 and X2 on the right. This is similarly true for M2, which is associated with X1 and X2 on the left.\u00a0 However, it is associated with F(t) on the right.<\/span>\n\n<\/div>\n<div>\n\n[caption id=\"attachment_76\" align=\"aligncenter\" width=\"489\"]<img class=\"wp-image-76\" src=\"https:\/\/libraryresources.nse.org.ng\/wp-content\/uploads\/sites\/18\/2026\/03\/chp22-300x228.png\" alt=\"Overview of the mechanical system, showing the system dynamics equations\" width=\"489\" height=\"372\"> Figure 11.2: Overview of the mechanical system, showing the system dynamics equations[\/caption]\n\n<\/div>\n<div><\/div>\n<div><span style=\"text-align: initial;font-size: 1em\">Crucial to the modeling are the signs of X1 and X2. For M1, X1 is the <\/span><span style=\"text-align: initial;font-size: 1em\">position <\/span><span style=\"text-align: initial;font-size: 1em\">of the object itself. However, X2, is not the <\/span><span style=\"text-align: initial;font-size: 1em\">position of the object <\/span><span style=\"text-align: initial;font-size: 1em\">itself; therefore, the X2 sign needs to be negative, and the X1 sign needs to be positive if all terms were on the left side of the equation. In contrast, for M2, the X2 motion should be positive, and X1 needs to be negative. Based on this analysis, we have the following two equations shown in Figure 11.2. These two equations describe the system dynamics of the spring, damper, and mass system. It is evident that for M1 and M2, we have to be very careful when considering X1 and X2 motions at the same time.<\/span><\/div>\n<div><\/div>\n<div>\n\nIn this example, it is easy to ignore the motion associated with the object. For example, mass M1 is associated with X1 and X2 of the spring motion located on the right side of M1. In this case, spring motion X1 is positive and X2 is negative. On the other hand, M2 motion is denoted as X2. On the left side of the M2, the spring is associated with the motions X2 and X1.\u00a0 Figure 11.2 shows these two different motions.\n\n<span style=\"text-align: initial;font-size: 1em\">The state space of the mechanical system shown in Figure 11.2 can be derived through the following steps. First, conduct the variable replacement as shown in Figure 11.3. The purpose of the variable replacement is to reduce the second order equation to two first order equations.\u00a0<\/span>\n\n<\/div>\n\n[caption id=\"attachment_82\" align=\"aligncenter\" width=\"483\"]<img class=\"wp-image-77\" src=\"https:\/\/libraryresources.nse.org.ng\/wp-content\/uploads\/sites\/18\/2026\/03\/chp23-300x259.png\" alt=\"The state space derivation of the mechanical system.\" width=\"483\" height=\"417\"> Figure 11.3: The state space derivation of the mechanical system.[\/caption]\n\n<span style=\"text-align: initial;font-size: 1em\">For this:<\/span>\n\n\\begin{equation}\n\\label{eq1}\n\\dot{x}_1 =V_1(t) \\quad \\dot{x}_1 =V_2(t)\n\\end{equation}\n\nTherefore the second order derivative of the equation is\n\n\\begin{equation}\n\\label{eq1}\n\\ddot{x}_1 = \\dot{V}_{1}(t) \\quad \\ddot{x}_1 = \\dot{V}_{2}(t)\n\\end{equation}\n\nWith these two variable replacements, we can easily substitute $V_1(t) , \\dot{V_1}(t), V_2(t) , \\dot{V_2}(t) $ back into the system dynamics equations to obtain the substituted system equations.\n\n\\begin{equation}\n\\label{eq1}\n\\dot{V}_1 = 1\/M_1 * (-DV_1 - KX_1 + KX_2)\n\\end{equation}\n\n\\begin{equation}\n\\label{eq1}\n\\dot{V}_2 = 1\/M_2 * (- KX_1 + KX_1 + f(t))\n\\end{equation}\n\nFinally, we can write the state space format to represent these equations in the state space format shown in Figure 11.3 above.\n<h1>2) Modeling of Electrical System State Space<\/h1>\nFollowing the modeling of the mechanical system, it is time to consider modeling of an electrical system. In order to model an electrical system, it is important to understand the relationships between current, voltage, and charge.\u00a0 These relationships are important for us to be able to model capacitors, inductors, and resistors in a circuit. The relationships of current, voltage, and charge for capacitors, inductors, and resistors are shown in Figure 11.4.\n\n&nbsp;\n\n[caption id=\"attachment_82\" align=\"aligncenter\" width=\"539\"]<img class=\"wp-image-78\" src=\"https:\/\/libraryresources.nse.org.ng\/wp-content\/uploads\/sites\/18\/2026\/03\/chp24-300x157.png\" alt=\"Capacitor, inductor, and resistor current, voltage, and charge equations\" width=\"539\" height=\"282\"> Figure 11.4: Capacitor, inductor, and resistor current, voltage, and charge equations[\/caption]\n\nIn Figure 11.4, you can find a strong pattern showing an inverse relationship between capacitor current and voltage equations.\u00a0 The capacitor current equation is a derivative equation.\u00a0 However, its voltage equation is an integral equation.\u00a0 \u00a0Similarly, the inductor current equation is a derivative equation, while the voltage equation is an integral equation.\u00a0 By understanding the patterns, it becomes easy for us to use these equations effectively.\n\nTo be most effective in remembering or using the equations, start by remembering the capacitor charge equation. It is a simple equation: $Q=CV$, where $Q = \\int i(t) \\ dt $. It shows that a capacitor behaves similarly to a battery. It accepts a charge from a power source. The voltage is proportional to the charge on the capacitor. On the other hand, charge is the result of the continuous accumulation of current to the capacitor. These two equations are the most fundamental equations in an electrical circuit. These two equations are located at the top right of Figure 4. Understanding these two equations will help you understand the other equations in Figure 11.4.\n\nThe first example of the circuit's state space is shown in Figure 11.5. This example demonstrates a typical RLC circuit.\u00a0 In this example, the resistor and capacitor are in parallel.\u00a0 An inductor is in series with the capacitor and resistor lines. The question asks us to find the state space consisting of two states X1 = $V_c(t)$ and X2 = $I_l(t)$. The output Y is $I_R(t)$.\n\n[caption id=\"attachment_82\" align=\"alignnone\" width=\"559\"]<img class=\"wp-image-79\" src=\"https:\/\/libraryresources.nse.org.ng\/wp-content\/uploads\/sites\/18\/2026\/03\/chp25-286x300.png\" alt=\"RLC circuit\" width=\"559\" height=\"586\"> Figure 11.5: Solve the RLC circuit state space[\/caption]\n\nTo solve the state space of an electrical circuit problem, we need to follow the following three steps.\n\n<strong>Step 1: Define the goal.\u00a0<\/strong> The goal is to find the state space equations for the system. By defining the state space, we can identify the \"good\" variables, which are the state space variables.\n\n<strong>Step 2: Replace \"bad\" variables with \"good\" variables.<\/strong>\u00a0 Here, \"bad\" variables are the variables irrelevant to the state space. We need to replace these \"bad\" variables irrelevant to the state space with the \"good\" variables relevant to the state space.\n\n<strong>Step 3: Confirm the state space.<\/strong> Following the replacement of \"bad\" variables with \"good\" variables, the state space will be obtained.\n\n&nbsp;\n\nFor this example, we need to follow these specific three steps.\n\n<strong>Step 1 (Figure 11.6):\u00a0<\/strong> The example of the RLC state space starts by understanding the target of the state space. The target of the state space is a two-by-two matrix. This two-by-two matrix essentially consists of two equations. These two equations are functions of the $V_c(t) $, $ i_L(t) $, and input <i>U<\/i>\u00a0The input <em>U<\/em> here is $ V(t)$. As such, step 1 is to understand the targeted state space. Once we understand the targeted state space, we start step 2.\n\n<strong>Step 2 (Figure 11.7):\u00a0<\/strong> The key idea of step 2 is to replace \"bad\" variables with \"good\" variables. Step 2 starts by listing $V_c(t)$ and $i_L(t)$. It should be noted that for $V_c(t)$, there is a \"bad\" variable $i_c$.\u00a0 We can easily replace this \"bad\" variable with $V_c$ and <em>R<\/em>, which are both \"good\" variables.\u00a0 Similarly, for $i_L$, there is a \"bad\" variable, $V_l$. However, $V_l$ can be replaced by the \"good\" variables $V_t$ and $V_c$.\n\n<strong>Step 3 (Figure 11.8):\u00a0<\/strong> Following the replacement of the \"bad\" variables with \"good\" variables, we can obtain the targeted state space A and B matrices. Through step 3, we also can obtain the C and D matrices. To calculate the C and D matrices, the Y value must be calculated. Y is $i_R$. Similarly, for calculation of $i_R$, the \"bad\" variable $V_R$ can be replaced by the \"good\" variables $V_C$ and R. Through the replacement, the C and D matrices will be obtained.\n\n&nbsp;\n\n[caption id=\"attachment_82\" align=\"alignnone\" width=\"580\"]<img class=\"wp-image-80\" src=\"https:\/\/libraryresources.nse.org.ng\/wp-content\/uploads\/sites\/18\/2026\/03\/chp26-300x300.png\" alt=\"Step 1 of the RLC circuit state space\" width=\"580\" height=\"580\"> Figure 11.6:\u00a0 Step 1 of the RLC circuit state space[\/caption]\n\n[caption id=\"attachment_82\" align=\"alignnone\" width=\"579\"]<img class=\"wp-image-81\" src=\"https:\/\/libraryresources.nse.org.ng\/wp-content\/uploads\/sites\/18\/2026\/03\/chp27-300x300.png\" alt=\"Step 2 of the RLC circuit state space\" width=\"579\" height=\"579\"> Figure 11.7: Step 2 of the RLC circuit state space[\/caption]\n\n[caption id=\"attachment_82\" align=\"alignnone\" width=\"569\"]<img class=\"wp-image-82\" src=\"https:\/\/libraryresources.nse.org.ng\/wp-content\/uploads\/sites\/18\/2026\/03\/chp28-300x275.png\" alt=\"Step 3 of the RLC circuit state space\" width=\"569\" height=\"522\"> Figure 11.8: Step 3 of the RLC circuit state space[\/caption]","rendered":"<div>[latexpage]<\/div>\n<div><\/div>\n<div>State space is an important tool for effective control. The capability of modeling a system using the state space is an important skill to control the system. The conversion of a real-world system to state space is the first step in the process of modeling of a system. Overall, modeling the system can provide insights into the system behavior. The system dynamics can be revealed through the modeling process. Hence, the modeling process can enhance our understanding of the underlying system.<\/div>\n<div><\/div>\n<div><\/div>\n<div>Modeling of the underlying system typically starts with the understanding the nature of the system.\u00a0 All systems have effort and flow.\u00a0 For a mechanical system, we need to understand the force and torque (effort), as well as position and speed (flow) of the system.\u00a0 Similarly, for a electrical system, we must understand the voltage (effort) and current (flow) relationships of different components of the circuit in order to provide insights into how the circuit should work.<\/div>\n<div><\/div>\n<div><\/div>\n<h1><strong>1) Modeling of <\/strong><strong>Mechanical System State Space<\/strong><\/h1>\n<div><\/div>\n<div>Modeling a mechanical system is useful for understanding the interactions between the components. These interactions can be considered states. State space is particularly good at capturing such trivial relationships between the state variables. An example of the mechanical state space is illustrated through the following example, shown in Figure 11.1.<\/div>\n<div><\/div>\n<div>\n<figure id=\"attachment_75\" aria-describedby=\"caption-attachment-75\" style=\"width: 481px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-75\" src=\"https:\/\/libraryresources.nse.org.ng\/wp-content\/uploads\/sites\/18\/2024\/08\/chp21-300x211.png\" alt=\"The graph shows you an example of diagram of the mechanical system to show you the process of deriving state space.\" width=\"481\" height=\"339\" srcset=\"https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2024\/08\/chp21-300x211.png 300w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2024\/08\/chp21-1024x719.png 1024w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2024\/08\/chp21-768x540.png 768w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2024\/08\/chp21-65x46.png 65w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2024\/08\/chp21-225x158.png 225w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2024\/08\/chp21-350x246.png 350w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2024\/08\/chp21.png 1318w\" sizes=\"(max-width: 481px) 100vw, 481px\" \/><figcaption id=\"caption-attachment-75\" class=\"wp-caption-text\">Figure 11.1: The overview of the mechanical system for state space modeling<\/figcaption><\/figure>\n<\/div>\n<div><\/div>\n<div><\/div>\n<div>\n<p>In this example, the image shows a mechanical system with two masses, M1 and M2, shown in Figure 11.1. The two masses are connected to a spring and damper. An external force F(t) is imposed on the system. Based on the system, there are two states, X1 and X2, shown in Figure 11.2. The two states are correlated. <span style=\"text-align: initial;font-size: 1em\">Object 1 is associated with position X1, and object 2 is associated with position X2. The modeling process starts with analysis of M1 and M2.\u00a0 M1 is associated with two different motions: X1 on the left, and both X1 and X2 on the right. This is similarly true for M2, which is associated with X1 and X2 on the left.\u00a0 However, it is associated with F(t) on the right.<\/span><\/p>\n<\/div>\n<div>\n<figure id=\"attachment_76\" aria-describedby=\"caption-attachment-76\" style=\"width: 489px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-76\" src=\"https:\/\/libraryresources.nse.org.ng\/wp-content\/uploads\/sites\/18\/2026\/03\/chp22-300x228.png\" alt=\"Overview of the mechanical system, showing the system dynamics equations\" width=\"489\" height=\"372\" srcset=\"https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp22-300x228.png 300w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp22-1024x780.png 1024w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp22-768x585.png 768w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp22-65x50.png 65w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp22-225x171.png 225w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp22-350x267.png 350w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp22.png 1082w\" sizes=\"(max-width: 489px) 100vw, 489px\" \/><figcaption id=\"caption-attachment-76\" class=\"wp-caption-text\">Figure 11.2: Overview of the mechanical system, showing the system dynamics equations<\/figcaption><\/figure>\n<\/div>\n<div><\/div>\n<div><span style=\"text-align: initial;font-size: 1em\">Crucial to the modeling are the signs of X1 and X2. For M1, X1 is the <\/span><span style=\"text-align: initial;font-size: 1em\">position <\/span><span style=\"text-align: initial;font-size: 1em\">of the object itself. However, X2, is not the <\/span><span style=\"text-align: initial;font-size: 1em\">position of the object <\/span><span style=\"text-align: initial;font-size: 1em\">itself; therefore, the X2 sign needs to be negative, and the X1 sign needs to be positive if all terms were on the left side of the equation. In contrast, for M2, the X2 motion should be positive, and X1 needs to be negative. Based on this analysis, we have the following two equations shown in Figure 11.2. These two equations describe the system dynamics of the spring, damper, and mass system. It is evident that for M1 and M2, we have to be very careful when considering X1 and X2 motions at the same time.<\/span><\/div>\n<div><\/div>\n<div>\n<p>In this example, it is easy to ignore the motion associated with the object. For example, mass M1 is associated with X1 and X2 of the spring motion located on the right side of M1. In this case, spring motion X1 is positive and X2 is negative. On the other hand, M2 motion is denoted as X2. On the left side of the M2, the spring is associated with the motions X2 and X1.\u00a0 Figure 11.2 shows these two different motions.<\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">The state space of the mechanical system shown in Figure 11.2 can be derived through the following steps. First, conduct the variable replacement as shown in Figure 11.3. The purpose of the variable replacement is to reduce the second order equation to two first order equations.\u00a0<\/span><\/p>\n<\/div>\n<figure id=\"attachment_82\" aria-describedby=\"caption-attachment-82\" style=\"width: 483px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-77\" src=\"https:\/\/libraryresources.nse.org.ng\/wp-content\/uploads\/sites\/18\/2026\/03\/chp23-300x259.png\" alt=\"The state space derivation of the mechanical system.\" width=\"483\" height=\"417\" srcset=\"https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp23-300x259.png 300w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp23-1024x884.png 1024w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp23-768x663.png 768w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp23-65x56.png 65w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp23-225x194.png 225w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp23-350x302.png 350w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp23.png 1378w\" sizes=\"(max-width: 483px) 100vw, 483px\" \/><figcaption id=\"caption-attachment-82\" class=\"wp-caption-text\">Figure 11.3: The state space derivation of the mechanical system.<\/figcaption><\/figure>\n<p><span style=\"text-align: initial;font-size: 1em\">For this:<\/span><\/p>\n<p>\\begin{equation}<br \/>\n\\label{eq1}<br \/>\n\\dot{x}_1 =V_1(t) \\quad \\dot{x}_1 =V_2(t)<br \/>\n\\end{equation}<\/p>\n<p>Therefore the second order derivative of the equation is<\/p>\n<p>\\begin{equation}<br \/>\n\\label{eq1}<br \/>\n\\ddot{x}_1 = \\dot{V}_{1}(t) \\quad \\ddot{x}_1 = \\dot{V}_{2}(t)<br \/>\n\\end{equation}<\/p>\n<p>With these two variable replacements, we can easily substitute $V_1(t) , \\dot{V_1}(t), V_2(t) , \\dot{V_2}(t) $ back into the system dynamics equations to obtain the substituted system equations.<\/p>\n<p>\\begin{equation}<br \/>\n\\label{eq1}<br \/>\n\\dot{V}_1 = 1\/M_1 * (-DV_1 &#8211; KX_1 + KX_2)<br \/>\n\\end{equation}<\/p>\n<p>\\begin{equation}<br \/>\n\\label{eq1}<br \/>\n\\dot{V}_2 = 1\/M_2 * (- KX_1 + KX_1 + f(t))<br \/>\n\\end{equation}<\/p>\n<p>Finally, we can write the state space format to represent these equations in the state space format shown in Figure 11.3 above.<\/p>\n<h1>2) Modeling of Electrical System State Space<\/h1>\n<p>Following the modeling of the mechanical system, it is time to consider modeling of an electrical system. In order to model an electrical system, it is important to understand the relationships between current, voltage, and charge.\u00a0 These relationships are important for us to be able to model capacitors, inductors, and resistors in a circuit. The relationships of current, voltage, and charge for capacitors, inductors, and resistors are shown in Figure 11.4.<\/p>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_82\" aria-describedby=\"caption-attachment-82\" style=\"width: 539px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-78\" src=\"https:\/\/libraryresources.nse.org.ng\/wp-content\/uploads\/sites\/18\/2026\/03\/chp24-300x157.png\" alt=\"Capacitor, inductor, and resistor current, voltage, and charge equations\" width=\"539\" height=\"282\" srcset=\"https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp24-300x157.png 300w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp24-1024x536.png 1024w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp24-768x402.png 768w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp24-65x34.png 65w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp24-225x118.png 225w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp24-350x183.png 350w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp24.png 1422w\" sizes=\"(max-width: 539px) 100vw, 539px\" \/><figcaption id=\"caption-attachment-82\" class=\"wp-caption-text\">Figure 11.4: Capacitor, inductor, and resistor current, voltage, and charge equations<\/figcaption><\/figure>\n<p>In Figure 11.4, you can find a strong pattern showing an inverse relationship between capacitor current and voltage equations.\u00a0 The capacitor current equation is a derivative equation.\u00a0 However, its voltage equation is an integral equation.\u00a0 \u00a0Similarly, the inductor current equation is a derivative equation, while the voltage equation is an integral equation.\u00a0 By understanding the patterns, it becomes easy for us to use these equations effectively.<\/p>\n<p>To be most effective in remembering or using the equations, start by remembering the capacitor charge equation. It is a simple equation: $Q=CV$, where $Q = \\int i(t) \\ dt $. It shows that a capacitor behaves similarly to a battery. It accepts a charge from a power source. The voltage is proportional to the charge on the capacitor. On the other hand, charge is the result of the continuous accumulation of current to the capacitor. These two equations are the most fundamental equations in an electrical circuit. These two equations are located at the top right of Figure 4. Understanding these two equations will help you understand the other equations in Figure 11.4.<\/p>\n<p>The first example of the circuit&#8217;s state space is shown in Figure 11.5. This example demonstrates a typical RLC circuit.\u00a0 In this example, the resistor and capacitor are in parallel.\u00a0 An inductor is in series with the capacitor and resistor lines. The question asks us to find the state space consisting of two states X1 = $V_c(t)$ and X2 = $I_l(t)$. The output Y is $I_R(t)$.<\/p>\n<figure id=\"attachment_82\" aria-describedby=\"caption-attachment-82\" style=\"width: 559px\" class=\"wp-caption alignnone\"><img decoding=\"async\" class=\"wp-image-79\" src=\"https:\/\/libraryresources.nse.org.ng\/wp-content\/uploads\/sites\/18\/2026\/03\/chp25-286x300.png\" alt=\"RLC circuit\" width=\"559\" height=\"586\" srcset=\"https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp25-286x300.png 286w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp25-768x807.png 768w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp25-65x68.png 65w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp25-225x236.png 225w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp25-350x368.png 350w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp25.png 956w\" sizes=\"(max-width: 559px) 100vw, 559px\" \/><figcaption id=\"caption-attachment-82\" class=\"wp-caption-text\">Figure 11.5: Solve the RLC circuit state space<\/figcaption><\/figure>\n<p>To solve the state space of an electrical circuit problem, we need to follow the following three steps.<\/p>\n<p><strong>Step 1: Define the goal.\u00a0<\/strong> The goal is to find the state space equations for the system. By defining the state space, we can identify the &#8220;good&#8221; variables, which are the state space variables.<\/p>\n<p><strong>Step 2: Replace &#8220;bad&#8221; variables with &#8220;good&#8221; variables.<\/strong>\u00a0 Here, &#8220;bad&#8221; variables are the variables irrelevant to the state space. We need to replace these &#8220;bad&#8221; variables irrelevant to the state space with the &#8220;good&#8221; variables relevant to the state space.<\/p>\n<p><strong>Step 3: Confirm the state space.<\/strong> Following the replacement of &#8220;bad&#8221; variables with &#8220;good&#8221; variables, the state space will be obtained.<\/p>\n<p>&nbsp;<\/p>\n<p>For this example, we need to follow these specific three steps.<\/p>\n<p><strong>Step 1 (Figure 11.6):\u00a0<\/strong> The example of the RLC state space starts by understanding the target of the state space. The target of the state space is a two-by-two matrix. This two-by-two matrix essentially consists of two equations. These two equations are functions of the $V_c(t) $, $ i_L(t) $, and input <i>U<\/i>\u00a0The input <em>U<\/em> here is $ V(t)$. As such, step 1 is to understand the targeted state space. Once we understand the targeted state space, we start step 2.<\/p>\n<p><strong>Step 2 (Figure 11.7):\u00a0<\/strong> The key idea of step 2 is to replace &#8220;bad&#8221; variables with &#8220;good&#8221; variables. Step 2 starts by listing $V_c(t)$ and $i_L(t)$. It should be noted that for $V_c(t)$, there is a &#8220;bad&#8221; variable $i_c$.\u00a0 We can easily replace this &#8220;bad&#8221; variable with $V_c$ and <em>R<\/em>, which are both &#8220;good&#8221; variables.\u00a0 Similarly, for $i_L$, there is a &#8220;bad&#8221; variable, $V_l$. However, $V_l$ can be replaced by the &#8220;good&#8221; variables $V_t$ and $V_c$.<\/p>\n<p><strong>Step 3 (Figure 11.8):\u00a0<\/strong> Following the replacement of the &#8220;bad&#8221; variables with &#8220;good&#8221; variables, we can obtain the targeted state space A and B matrices. Through step 3, we also can obtain the C and D matrices. To calculate the C and D matrices, the Y value must be calculated. Y is $i_R$. Similarly, for calculation of $i_R$, the &#8220;bad&#8221; variable $V_R$ can be replaced by the &#8220;good&#8221; variables $V_C$ and R. Through the replacement, the C and D matrices will be obtained.<\/p>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_82\" aria-describedby=\"caption-attachment-82\" style=\"width: 580px\" class=\"wp-caption alignnone\"><img decoding=\"async\" class=\"wp-image-80\" src=\"https:\/\/libraryresources.nse.org.ng\/wp-content\/uploads\/sites\/18\/2026\/03\/chp26-300x300.png\" alt=\"Step 1 of the RLC circuit state space\" width=\"580\" height=\"580\" srcset=\"https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp26-300x300.png 300w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp26-150x150.png 150w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp26-768x768.png 768w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp26-65x65.png 65w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp26-225x225.png 225w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp26-350x350.png 350w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp26.png 980w\" sizes=\"(max-width: 580px) 100vw, 580px\" \/><figcaption id=\"caption-attachment-82\" class=\"wp-caption-text\">Figure 11.6:\u00a0 Step 1 of the RLC circuit state space<\/figcaption><\/figure>\n<figure id=\"attachment_82\" aria-describedby=\"caption-attachment-82\" style=\"width: 579px\" class=\"wp-caption alignnone\"><img decoding=\"async\" class=\"wp-image-81\" src=\"https:\/\/libraryresources.nse.org.ng\/wp-content\/uploads\/sites\/18\/2026\/03\/chp27-300x300.png\" alt=\"Step 2 of the RLC circuit state space\" width=\"579\" height=\"579\" srcset=\"https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp27-300x300.png 300w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp27-150x150.png 150w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp27-65x65.png 65w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp27-225x224.png 225w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp27-350x349.png 350w\" sizes=\"(max-width: 579px) 100vw, 579px\" \/><figcaption id=\"caption-attachment-82\" class=\"wp-caption-text\">Figure 11.7: Step 2 of the RLC circuit state space<\/figcaption><\/figure>\n<figure id=\"attachment_82\" aria-describedby=\"caption-attachment-82\" style=\"width: 569px\" class=\"wp-caption alignnone\"><img decoding=\"async\" class=\"wp-image-82\" src=\"https:\/\/libraryresources.nse.org.ng\/wp-content\/uploads\/sites\/18\/2026\/03\/chp28-300x275.png\" alt=\"Step 3 of the RLC circuit state space\" width=\"569\" height=\"522\" srcset=\"https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp28-300x275.png 300w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp28-1024x938.png 1024w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp28-768x703.png 768w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp28-65x60.png 65w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp28-225x206.png 225w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp28-350x320.png 350w, https:\/\/libraryresources.nse.org.ng\/robotics\/wp-content\/uploads\/sites\/18\/2026\/03\/chp28.png 1066w\" sizes=\"(max-width: 569px) 100vw, 569px\" \/><figcaption id=\"caption-attachment-82\" class=\"wp-caption-text\">Figure 11.8: Step 3 of the RLC circuit state space<\/figcaption><\/figure>\n","protected":false},"author":1,"menu_order":11,"template":"","meta":{"pb_show_title":"","pb_short_title":"Ch. 11: State Space Modeling","pb_subtitle":"","pb_authors":["hbzhang"],"pb_section_license":""},"chapter-type":[],"contributor":[61],"license":[],"class_list":["post-83","chapter","type-chapter","status-publish","hentry","contributor-hbzhang"],"part":66,"_links":{"self":[{"href":"https:\/\/libraryresources.nse.org.ng\/robotics\/wp-json\/pressbooks\/v2\/chapters\/83","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/libraryresources.nse.org.ng\/robotics\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/libraryresources.nse.org.ng\/robotics\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/libraryresources.nse.org.ng\/robotics\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":1,"href":"https:\/\/libraryresources.nse.org.ng\/robotics\/wp-json\/pressbooks\/v2\/chapters\/83\/revisions"}],"predecessor-version":[{"id":84,"href":"https:\/\/libraryresources.nse.org.ng\/robotics\/wp-json\/pressbooks\/v2\/chapters\/83\/revisions\/84"}],"part":[{"href":"https:\/\/libraryresources.nse.org.ng\/robotics\/wp-json\/pressbooks\/v2\/parts\/66"}],"metadata":[{"href":"https:\/\/libraryresources.nse.org.ng\/robotics\/wp-json\/pressbooks\/v2\/chapters\/83\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/libraryresources.nse.org.ng\/robotics\/wp-json\/wp\/v2\/media?parent=83"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/libraryresources.nse.org.ng\/robotics\/wp-json\/pressbooks\/v2\/chapter-type?post=83"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/libraryresources.nse.org.ng\/robotics\/wp-json\/wp\/v2\/contributor?post=83"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/libraryresources.nse.org.ng\/robotics\/wp-json\/wp\/v2\/license?post=83"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}