9.6: Experimental Investigation of Model-Based Control Strategy

Mechatronics: Fundamentals, Design, Integration, and Validation · LibreTexts

0%

Contents

    Text

    Size
    100%
    Theme
    Typeface
    Line length
    Spacing

    From LibreTexts, under CC BY-NC 4.0, as the source states it; its equations are written in TeX, which the PDF shows typeset. This page at LibreTexts.

    9.6: Experimental Investigation of Model-Based Control Strategy
    Learning Objectives

    After completing this section, you will be able to:

    1. Implement the model-based control strategy of the three-wheel cart for real-time application.
    2. Tune the model-based LQTI controller experimentally.

    This section addresses the experimental aspects of the model-based LQTI control of the three-wheel cart. These include the development of real-time control software in MATLAB/Simulink with modified LQTI control and driving logics; and test results for the LQTI control strategies. The electronic hardware for the three-wheel cart control system is the same as that shown in Figure 9.23. However, the real-time control software was redeveloped to implement the model-based LQTI strategy. The software was developed based on the control architecture shown in Figure 9.12. It was then found during initial experiments that the control gains shown in equations \ref{9.60} and \ref{9.62} cannot stabilize the three-wheel cart for either straight or turning operation. This is due to very large Coulomb friction torque in the gearbox between the motor and wheel axes. Thus, the control gain needs to be significantly reduced to have a stable closed-loop system. References [8] and [39] provide detailed discussions on the limitation of control gain due to modeling uncertainty. As the control gain increases, its sensitivity to modeling error also increases, leading to unstable closed-loop system. Thus, the LQTI controller is redesigned with weighting matrices \(Q_{cpi}=diag\ \left[10,\ 10,\ 10,\ 5\right]\) and \(R_{cpi}=1.\) The resulting control gain is shown below.

    \[K_{cpi}=\left[ \begin{array}{cccc} 3.1689 & 8.6980 & -2.2323 & -0.6983 \\ 3.1689 & -8.6980 & -2.2323 & 0.6983 \end{array} \right] \label{9.66}\]

    Due to significant reduction of LQTI control gain, the closed-loop system response is relatively slow; see equations \ref{9.66} and \ref{9.60}. To improve closed-loop system response performance, we use the feedforward controls shown in Figure 9.12. In this case, the final control outputs (\(u_{cp1}\) and \(u_{cp2}\)) to the physical system are defined below.

    \[u_{cp}={\left[u_{aL},\ u_{aR}\right]}^T=u_{cpi}+u_{cp0}={\left[{\Delta u}_{aL},\ {\Delta u}_{aR}\right]}^T+{\left[u_{aL0},\ u_{aR0}\right]}^T \label{9.67}\]

    where \({\Delta u}_{cp1}\) and \({\Delta u}_{cp2}\) are outputs of the LQTI state feedback controller for the left and right motors, respectively; and \(u_{aL0}\) and \(u_{aR0}\) are feedforward control signals as functions of reference signals \(r_{cart}\) and \(r_{\phi }\), respectively. In the SiL simulation study, both feedforward controls were set to zero. In the controller implementation, the feedforward controls \(u_{aL0}\) and \(u_{aR0}\) are functions defined by one-dimensional lookup tables that can be calibrated using the steady-state motor armature voltage commands. With the feedforward control architecture, the state feedback LQTI controller needs to compensate only the needed transient control system deviations from its nominal operation condition related to reference signals \(r_{cart}\) and \(r_{\phi }\). As a result, values of both integrators in the LQTI control scheme will be closed zero at the steady state.

    With the feedforward LQTI control architecture defined in Figure 9.12, the next step is to develop real-time control software in Simulink for the purpose of conducting experiments. To do so, we modify the triple-PID control software shown in Figure 9.25. Figure 9.31 shows the top-layer software. The reading blocks of rate-gyro sensor and hall-effect wheel-speed sensor are the same as that in the control architecture shown in Figure 9.25, and will not be discussed in this section. Both wheel speed signals are filtered by the same low-pass filter defined in equation \ref{9.64}. It has a corner frequency of \(0.8\) Hz. The rate-gyro signal is filtered by a low-pass filter defined in equation \ref{9.65} with a corner frequency of \(1.59\) Hz. The cart longitudinal speed is calculated in the same way as used for the PID.

    We use two reference sources to generate the cart speed reference single \(r_{cart}\): push buttons of “Forward” and “Backward”; and trajectory outputs of “TrajLeft” and TrajRight.” See the left side of Figure 9.31. When the “Forward” button is pushed, a calibrated value is assigned to the “ForBackWard” block. For example, the assigned \(-0.3\) refers to a \(0.3\) (m/s) forward driving speed. When the “backward” button is pushed, a different calibrated value is assigned to the same “ForBackWard” block. For example, the assigned \(0.3\) refers to a \(0.3\) (m/s) backward driving speed. Trajectory outputs, “TrajLeft” and TrajRight,” refer to the left and right wheel linear speed references. The average of these two signals is used to generate the linear cart speed reference single \(r_{cart}\).

    Two reference sources are used for generating the cart turning reference single \(r_{\phi }\): push buttons of “Left” and “Right;” and trajectory outputs of “TrajLeft” and TrajRight.” See the left side of Figure 9.31. When the “Left” button is pushed, a calibrated value is assigned to the “LeftRightTurn” block in Figure 9.31. For example, the assigned \(-0.2\) refers to a \(0.2\) (rad/s) turning reference speed. When the “Right” bottom is pushed, a different calibrated value is assigned to the same “LeftRightTurn” block. For example, the assigned \(0.2\) is referred to a \(-0.2\) (rad/s) turning speed. The difference of trajectory outputs “TrajLeft” and TrajRight” are used to calculate the turning speed reference signal \(r_{\phi }\) by dividing the half distance (\(r_v\)) between the two driving wheels. The “Reset” button connected to the “Reset” block in Figure 9.31 is used to reset both cart and turning speed error integrators. The “Traj. Start” and Traj. Stop” buttons, connected to the two input blocks of the “Trajectory Design” block, are used to start a driving trajectory and stop it, respectively. The “Trajectory Design” is the same as that in the PID Simulink model shown in Figure 9.24. All seven push buttons have the same functionality as those of the PID strategy.

    Figure 9.31: Real-time model-based Simulink three-wheel cart control model with feedforward control.The blue-dashed box in the middle of Figure 9.31 is new for the model-based strategy. Its main function is to generate the feedforward control signals for cart speed and turning. Two lookup tables generate the feedforward control signals (\(u_{aL0}\) and \(u_{aR0}\)) utilizing the cart and turning speed reference signals (\(r_{cart}\) and \(r_{\phi }\)) as inputs to the two lookup tables, respectively. The cart-speed feedforward signal (from the top lookup table in Figure 9.31’s blue dashed-box) is sent to both motors in PWM counts with the same sign. The sign is changed later (after the two switches) so that these two motors spin in the opposite direction to provide straight driving. Similarly, the cart-turning rate feedforward signal\(\ \)(from the bottom lookup table in Figure 9.31’s blue dashed-box) is sent to both motors in the form of PWM counts. To spin the two motors in the same direction to turn the three-wheel cart, the feedforward signal was fed to both DC motors with different signs. The signals that are input to the two lookup tables are the same as those input to the LQTI controller (to be addressed next). They are generated by adding the reference signal from push bottoms and trajectory outputs with a low-pass filter defined by equation \ref{9.64}.

    A Simulink block diagram showing the real-time Simulink implementation of saturated LQTI controller with with vector and matrix multiplication implemented as a Simulink function.
    Figure 9.32: Real-time Simulink implementation of LQTI control strategy.

    Now, let’s look at LQTI controller implementation in Simulink. Figure 9.32 shows an implementation of the LQTI controller strategy similar to the Simulink block diagram in Figure 9.20. The only difference is in the vector multiplication operations. In Figure 9.20, the LQTI control gain vectors were multiplied using the Simulink vector multiplication blocks. However, the real-time Simulink software (MATLAB 2019b) used for experiments cannot compile it. Instead, user-defined functions help complete the task of multiplying the state vector by the control gain vector. See both user-defined functions in Figure 9.32, where these coefficients (\(k_{ij},\ i=1,\ 2\ \&\ j=1,\ 2,\ 3,\ 4)\) are defined in equation \ref{9.68} with \(K_{cpi}\) to be the designed LQTI control gain defined in equation \ref{9.66}.

    \[K_{cpi}=\left[ \begin{array}{cccc} {-k}_{11} & {-k}_{12} & {-k}_{13} & {-k}_{14} \\ {-k}_{21} & {-k}_{22} & {-k}_{23} & {-k}_{24} \end{array} \right] \label{9.68}\]

    Once the real-time Simulink control software is developed, the software is debugged and simple experiments (such as straight forward and backward driving, left and right turning) are conducted to validate the software’s functionality. We can then conduct the trajectory driving experiment, similar to what is used in Section 9.5 to validate the dual- and triple-PID strategies.

    After the initial experimental validation, we are ready to conduct a scheduled driving test similar to those for dual- and triple-PID strategies. Figure 9.33 shows three-wheel cart speed and turning responses, and associated controls. The horizontal axis range (\(15\) seconds) in Figure 9.33 is the same as that in Figure 9.29. The forward driving started at the 18.8th second with a reference cart speed of \(0.15\) (m/s) for five seconds. The turning motion started at the 24.2th second with a reference angular turning rate of about 0.45 (rad/s) for two and half seconds..

    A Matlab plot showing the experimental responses of left and right motor control input errors, left and right wheel speed signals, cart yaw rate, left and right motor PID control signals for the three-wheel cart with model-based LQTI control.
    Figure 9.33: Model-based LQTI three-wheel cart test results.

    For the first phase (straight forward driving), both left and right wheel-motor control outputs are similar to these for triple-PID case with about \(40\) PWM counts; see the third row of Figure 9.33. The right motor has a sign reversal, comparing Figure 9.33 and Figure 9.29. However, both the left and right motor control signals from the LQTI controller are much smoother than those from the triple-PID controllers, probably due to low LQTI control gain with feedforward control. As a result, both left and right wheel speed responses are also much smoother than those from the triple-PID controllers. The speed error response indicates that the response time is about \(1.1\) seconds while the triple-PID needs more than \(2\) seconds; see the top-left plot in Figure 9.33. Meanwhile, the turning error, shown in the top-right plot of Figure 9.33, remains relatively small.

    For the second phase (turning motion) starting at the 24.2th second, the left-wheel speed is reversed while the right-wheel speed remains almost unchanged, with a small peak at the start of turning to reduce tracking error; see the second row of Figure 9.33. Comparing Figure 9.33 with Figure 9.29, we can see that the LQTI control provides a slight advantage over that of the triple-PID one, with a response time less than one second. During the turning between the 24.2th and 26.7th seconds, the track error reduces to zero; see the bottom right of Figure 9.33. Both LQTI and triple-PID control outputs for the right motor are larger than the left motor during the turning, which is mainly used to compensate the difference between left and right motor drive systems. The turning (or yaw) rate error is large at the beginning and end of the turning due to transient operations.

    The LQTI control strategy provides an improved response performance over the triple-PID strategy. Both strategies are able to track the desired cart linear and turning reference speeds. However, the LQTI strategy is much simpler than the triple-PID one. Model-based controllers are sensitive to modeling error, and the gains used in simulation studies with good closed-loop performance may not be suitable for experimental study due to modeling error. Although we did not conduct experiments with an unleveled surface, the control strategy is partially validated by demonstrating the capability of tracking the yaw rate. Compared with the dual-PID control strategy, both triple-PID and LQTI control strategies are able to drive the three-wheel cart in a straight line with zero yaw rate reference signal.

    Section Summary

    This section develops real-time Simulink control software of the model-based LQTI control strategy. After it is implemented into the experimental host laptop, we debug the developed software. Then, we conduct the experimental study utilizing model-based LQTI control of the three-wheel cart. We also reduce the LQTI control gain by modifying the design state weighting matrix. We then collect test data in the Simulink environment through the display scope. Finally, we compare the model-based test responses with those of the triple-PID strategy.

    Section Keywords

    Practice Problems

    1. Why can’t the LQTI control model used in simulation studies be used for real-time experimental study? Select the correct answer.
      1. Due to different Simulink versions used in simulation and experiment.
      2. Due to modeling error from the very large Coulomb friction.
      3. Due to the control model difference.
    2. What is the purpose of adding the feedforward control to the LQTI control strategy? Select the correct answer.
      1. To improve the system response performance with reduced LQTI gain.
      2. To balance the two motors.
      3. To improve the stability.
    3. Why does the control gain multiplication model in the Simulink simulation model (see Figure 9.20) need to be modified for real-time Simulink implementation (see Figure 9.27)? Select all correct answers.
      1. To improve numerical calculation accuracy.
      2. To improve numerical calculation efficiency.
      3. The real-time Simulink model does not allow vector multiplication for the 2019a version of MATLAB.
    4. Modify the LQTI simulation model in Figure 9.20. Add the feedforward control with LQTI control gain defined in equation \ref{9.66}, utilizing the lookup tables used in the real-time software. Conduct the simulation study.

    This page titled 9.6: Experimental Investigation of Model-Based Control Strategy was last modified on Thu, 23 Jul 2026 04:41:31 GMT and is shared under a CC BY-NC 4.0 license and was authored, remixed, and/or curated by Guoming Zhu (Co-DREAM OER) .