# Gain-Scheduled Model Predictive Control for
## 2 Dynamic Equation and Characteristics Analysis
### Dynamical Equation  
Figure 1 presents the schematic of the CIPS with friction and disturbances. The CIPS mainly consists of a cart and a SIP. For the sake of simplicity, the SIP is considered as a linkage with its mass concentrated at its center of mass. \(M\) and \(m\) are the masses of the cart and the SIP, respectively. \(2l\) is the length of the SIP. \(\theta\) is the pendulum angle of the SIP. \(f_{m}\) and \(f_{M}\) are the disturbances acting on the SIP and the cart, respectively. \(u\) is the driving force, which is the input of the CIPS. \(u\) is directly applied to the cart. In addition, the cart is also subjected to a friction force \(f\). The junction point between the cart and the SIP is marked as the coordinate origin \(O\). Under the actions of \(u\) and \(f\), the cart moves in a straight line along the \(x\)-axis. Meanwhile, the SIP produces a pendulum motion on the \(xOz\) plane with respect to the cart. For the cart, the absolute coordinate of its center of mass is denoted as \((x,0)\). Meanwhile, for the SIP, the absolute coordinate of its center of mass is denoted as \((x_{S},z_{S})\). \((x_{S},z_{S})\) can be expressed as  
\[ \begin{cases}x_{S}=x-l\sin\theta\\ z_{S}=l\cos\theta\end{cases}  \tag{1}\]  
The force analysis of the SIP is shown in Figure 2. In Figure 2, \(G=mg\) is the gravity (\(g\) is the gravitational acceleration). \(F_{Mmx}\) and \(F_{Mmz}\) are the forces exerted by the cart on the  
Figure 1: The force analysis of the CIPS. SIP along the \(x\)-axis and \(z\)-axis, respectively. According to the Euler equation, the resultant moment (\(M_{O}\)) of the SIP with respect to the coordinate origin (\(O\)) can be expressed as (2). \[M_{O}=ml^{2}\bar{\theta}=f_{ml}l\cos\theta+mgl\sin\theta+m\ddot{x}l\cos\theta \tag{2}\]  
where \(\bar{\theta}\) is the angular acceleration of the SIP, and \(\ddot{x}\) is the acceleration of the cart. For the SIP, the force analysis along the \(x\)-axis is shown in Figure 3. According to [PERSON]'s second law of motion, it is easy to obtain that  
\[m\ddot{x}_{S}=F_{Mmx}-f_{m} \tag{3}\]  
where \(m\ddot{x}_{S}\) is the component of the acceleration of the SIP along the \(x\)-axis. Denoting \(F_{mMx}\) as the force exerted by the SIP on the cart along the \(x\)-axis, according to [PERSON]'s third law of motion, \(F_{mMx}\) is expressed as  
\[F_{mMx}=-F_{Mmx}=-f_{m}-m\ddot{x}_{S} \tag{4}\]  
For the cart, the force analysis along the \(x\)-axis is shown in Figure 4. According to [PERSON]'s second law of motion, it is easy to obtain that  
\[M\ddot{x}=u+F_{mMx}-f_{M}+f \tag{5}\]  
where \(u\) is the driving force applied to the cart, which is also the control input of the whole CIPS. In addition, the friction force, \(f\), can be calculated by  
\[f=-\eta\dot{x} \tag{6}\]  
where \(\eta\) is the friction factor, and \(\dot{x}\) is the velocity of the cart. Figure 4: The force analysis of the cart along the \(x\)-axis. Figure 1:0 The force analysis of the SIP along the \(x\)-axis. Figure 1:1 The force analysis of the SIP. According to (1) and (4) to (6), it is easy to obtain that  
Figure 1:2  
where \(\dot{\theta}\) is the angular velocity of the SIP. According to (2), \(\ddot{\theta}\) is expressed as  
Figure 1:3  
Substituting (8) into (7), we can obtain that  
Figure 1:4  
According to (9), Equation (10) is obtained:  
Figure 1:5  
The left side of the equals sign of (10) can be simplified as  
Figure 1:6  
According to (10) and (11), \(\ddot{x}\) can be expressed as  
Figure 1:7  
Substituting (12) into (8), we can obtain the following:  
Figure 1:8 Figure 1:9 \[M_{O}=ml^{2}\bar{\theta}=f_{ml}l\cos\theta+mgl\sin\theta+m\ddot{x}l\cos\theta \tag{2}\]0  
According to (12) and (13), and selecting \(X=\left[X_{1}\ \ X_{2}\ \ X_{3}\ \ X_{4}\right]^{T}=\left[x\ \ \ \dot{x}\ \ \dot{\theta}\ \ \dot{ \theta}\right]^{T}\) as the states of the CIPS, its dynamic equation in state-space form can be expressed as (14). In (14), \(Z=\left[Z_{1},Z_{2}\right]^{T}\) is the output of the CIPS. \[\left\{