辅导案例-ME5401

欢迎使用51辅导,51作业君孵化低价透明的学长辅导平台,服务保持优质,平均费用压低50%以上! 51fudao.top
EE5101R/ME5401 Linear Systems Mini-project 2016
1 / 7

Control of a Stationary Self-Balancing Two-wheeled Vehicle
Important note: The due date is 22/11/2019. You may choose to hand in your report to the ECE
department office, or directly to my office (E4-0807). Late submission is absolutely not allowed as
the grades have to be submitted to the department very soon after the final exam. DO NOT submit
your report in IVLE as only hardcopy will be accepted. Softcopy by email will not be allowed unless
with valid reasons. You may work together with your classmates. But do write your report
independently. And the results are supposed to be different from each other as the parameters are
based upon your matriculation numbers.
1 Background
We all had a tough time when learning to ride a bicycle when we are a teenager. It usually takes
months to master that skill after crashing into walls for hundreds of times. Needless to say even after
that, it is still difficult for us to ride on uneven surface or turn when riding in a high speed. Would
that be excited if such two-wheeled vehicle comes to the market that it can self-balance itself to
improve its stability and driving safety?
Self-sustaining two-wheeled vehicle not only is a proof of how control theory has been
developed during the past decades, but also has a huge market potential. Therefore, a lot of
researchers from universities and companies are working on related topics. Although most of the
study are still in experimental stage, there are research groups and startups that have already published
demonstration video online, such as the C-1 motorcycle from Lit Motors [1].
Figure 1 is a screenshot from a demonstration video on YouTube. As we can see, the vehicle
looks like a motorcycle from outside, but inside the vehicle the driver drives as if it is a car. The
vehicle self-balances itself when running on the road or even when it is still. This two-wheeled self-
balancing vehicle is said to combine the virtues of both the car and the motor: safety and low cost.

Figure 1 Two-wheeled self-balancing electric car/motor [1]
Since there are many more dynamics involved when the vehicle is running, in this mini-project
we only consider the self-balance of the two-wheeled vehicle when it is stationary. We will try to
balance this vehicle using the control methods we have learned in Linear Systems.
2 Modelling
For model-based control, the first step is to build an effective dynamic model for our target plant,
i.e., the two-wheeled vehicle in this project. The detailed procedures to model this vehicle can be
found in [2] and [3]. Here we only give a short introduction and the resulted state space model.
EE5101R/ME5401 Linear Systems Mini-project 2016
2 / 7

An experimental system for the two-wheeled vehicle prototype is shown in Figure 2. The two-
wheeled vehicle consists of three parts. There is a cart system that corresponds to the rider’s center-
of-gravity movement, a steering system (a front part) for steering, and a body (a rear part). The front
part and the rear part are structures that are movable through a steering axis. A cart system and a
steering system are driven by DC servo motor, and DC motors are controlled by servo amplifier
which contains the velocity control system. Handle angle and cart position are measured by encoders.
Attitude angles of the two-wheeled vehicle (roll angle and yaw angle) are measured by gyroscopes.

Figure 2 Composition of experimental system


Figure 3 Two-wheeled vehicle structure model
The mechanical structure for the two-wheeled vehicle is given in Figure 3. The two-wheeled
EE5101R/ME5401 Linear Systems Mini-project 2016
3 / 7

vehicle is stabilized by moving the cart position ( )d t and adjusting the handle angle ( )t . The
control inputs are the voltages ( )cu t and ( )hu t to two DC servo motors, which drives the cart
system and the steering system correspondingly.
For the dynamic model, the relevant symbols are defined in Table 1.
Table 1 Definition of Symbols
, , Mass of each part
, , Vertical length from a floor to a center-of-gravity of each part
,
Horizontal length from a front wheel rotation axis to a center-of-gravity of
part of front wheel and steering axis.
,
Horizontal length from a rear wheel rotation axis to a center-of-gravity of
part of rear wheel and steering axis.

Horizontal length from a rear wheel rotation axis to a center-of-gravity of
the cart system
Moment of inertia around center-of-gravity x axially
Moment of inertia for part of front wheel z axially.
Moment of inertia for part of rear wheel that contains cart system z axially.
Viscous coefficient around x axis.
Viscous coefficient for part of front wheel around z axis.

Viscous coefficient for part of rear wheel that contains cart system around
z axis.
A viscosity coefficient of a movement direction of the cart system
Subscript f, r, c Part of front wheel, rear wheel, and cart system respectively
(), (), () Cart position, handle angle and bike angle
In [2], the state space linear model for the two-wheeled vehicle is derived to be

x Ax Bu
y Cx
 

(1)
where the state variable is
( ) ( ) ( ) ( ) ( ) ( )
T
x d t t t d t t t       (2)
and the matrices and the input vector are1

1 Some additional coupling terms are fabricated to facilitate our design.
EE5101R/ME5401 Linear Systems Mini-project 2016
4 / 7


51 52 53 54 55 56 51 52
0 0 0 1 0 0 0 0
0 0 0 0 1 0 0 0
0 0 0 0 0 1 0 0
,
0 6.5 10 0 0 11.2
5 3.6 0 0 0 40
A B
a a a a a a b b
 
 
   
   
   
   
    
    
   
   
    
(3)
 
1 0 0 0 0 0
0 1 0 0 0 0 , ( ), ( )
0 0 1 0 0 0
T
c hC u u t u t
 
  
 
  
(4)
The coefficients in (3) can be calculated as
51 52 53
54 55 56
2 2 2
51 52
( ) ( )
, ,
( )
, ,
, ,
f f r r c c r r F c c F f Ff Rc
R F
f f Ffc c x
f f Ffc c
f f r r c c x
M H M H M H g M L L M L L M L L gM g
a a a
den den L L den
M H LM H
a a a
den den den
M H LM H
b b den M H M H M H J
den den
 

   
   

    
      
(5)
where g is the gravitational acceleration, 29.8 /g m s .
The physical parameters in (5) can be measured directly or identified by experiments. The value
of all these physical parameters is summarized in Table 2.
Table 2 Physical parameters of the two-wheeled vehicle
Parameter Value Parameter Value
[kg] 2.14 + /20 [m] 0.18
[kg] 5.91 − /10 [m] 0.161
[kg] 1.74 [m] 0.098
[m] 0.05 [m] 0.133
[m] 0.128 [m] 0.308 + ( − )/100
[m] 0.259
[kgm
2] 0.5+( − )/100 [kgm
2/s] 3.33 − /20 + /60
15.5 − /3 + /2 27.5 − /2
11.5 + ( − )/( + + 3) 60 + ( − )/10
where in Table 2 a, b, c, d represent the last four digits in your matriculation number. For
example, if your matriculation number is A0162903M, then = 2, = 9, = 0, = 3 and one
of the parameters can be computed as μx = 3.33 − 9/20 + 2 ∗ 0/60 = 2.88.
EE5101R/ME5401 Linear Systems Mini-project 2016
5 / 7

3 Control System Design
After all, we get a linear state space model (1) for the stationary two-wheeled vehicle. In the
following, different control strategies will be explored to stabilize this vehicle to achieve its self-
balance. We will target both the regulation and set point tracking problems. The initial condition for
the two-wheeled vehicle system (1) is assumed to be  0 0.2, 0.1, 0.15, 1, 0.8, 0
T
x    .
3.1 Design specifications
The transient response performance specifications for all the outputs y in state space model (1)
are as follows:
1) The overshoot is less than 10%.
2) The 2% settling time is less than 5 seconds.
Note: (a) This transient response is checked by giving a step reference signal for each input
channel, i.e., [1, 0] and [0, 1], with zero initial conditions; (b) For all the following task 1) to 5), your
control system should satisfy this performance specification and you are supposed to finish the
required investigation for each task as well.
3.2 Tasks
Your study should include, but not limited to
1) Assume that you can measure all the six state variables, design a state feedback controller using
the pole place method, simulate the designed system and show all the six state responses to non-
zero initial state with zero external inputs. Discuss effects of the positions of the poles on system
performance, and also monitor control signal size. In this step, both the disturbance and set point
can be assumed to be zero.
2) Assume that you can measure all the six state variables, design a state feedback controller using
the LQR method, simulate the designed system and show all the state responses to non-zero
initial state with zero external inputs. Discuss effects of weightings Q and R on system
performance, and also monitor control signal size. In this step, both the disturbance and set point
can be assumed to be zero.
3) Assume you can only measure the three outputs. Design a state observer, simulate the resultant
observer-based LQR control system, monitor the state estimation error, investigate effects of
observer poles on state estimation error and closed-loop control performance. In this step, both
the disturbance and set point can be assumed to be zero.
4) Suppose we are only interested in the two outputs ( )d t and ( )t , i.e., a new output matrix is
2
1 0 0 0 0 0
0 0 1 0 0 0
C
 
  
 

then we get a 2-input-2-output system. Design a decoupling controller with closed-loop stability
and simulate the step set point response of the resultant control system to verify decoupling
performance with stability. In this step, the disturbance can be assumed to be zero. Is the
decoupled system BIBO stable? Is it internally stable in the sense of Lyapunov?
5) Assume that the operating set point for the three outputs is
1
0.5 ( ) / 201
0.1 ( ) / ( 10)10
sp
a b
y CA B
b c a d

   
       

where a, b, c, d are still the last four digits in your matriculation number, as defined above.
EE5101R/ME5401 Linear Systems Mini-project 2016
6 / 7

Therefore, the objective of the controller is to maintain the output vector around this operating set
point as close as possible.
Assume that you only have three cheap sensors to measure the output. Design a controller such
that the plant (vehicle) can operate around the set point as close as possible at steady state even when
step disturbances are present at the plant input. Plot out both the control and output signals.
6) We have learned about the multivariable integral control using state space model in Chapter 10.
It is a classical way to solve the set point tracking problem even when a constant disturbance is
involved. Now for the two-wheeled vehicle, can we maintain the three outputs at an arbitrary
constant set point with zero steady-state error? You can try the integral control method or any
other method you figure out. You can use simulations to test various set points and see the results.
Please give a formal mathematical analysis/proof for your conclusion.

Note that there are no unique answers to all the above design questions. For the tasks in our
project, you can assume that the control input is unlimited. However, in practice all the physical
actuators can only provide a limited drive capacity. You need to make your own judgement assuming
you are the engineer responsible for the control system design in the real world. There are three major
factors you should consider when you design and justify your controller:
 Speed --- Transient response
 Accuracy --- Steady state error
 Cost ---- Size of the control signals


4 Reference
[1] http://litmotors.com/c1/. More videos can be found on YouTube such as https://www.yout
ube.com/watch?v=_Yto_actn3c. and https://www.youtube.com/watch?v=zb51CvptTt4.
[2] Satoh, H. and Namerikawa, T., 2006. Modeling and robust attitude control of stationary
self-sustaining two-wheeled vehicle. Nippon Kikai Gakkai Ronbunshu C Hen (Transactions o
f the Japan Society of Mechanical Engineers Part C)(Japan), 18(7), pp.2130-2136.
[3] Satoh, H. and Namerikawa, T., 2007, October. Robust stabilization of running self-sustai
ning two-wheeled vehicle. In 2007 IEEE International Conference on Control Applications
(pp. 539-544). IEEE.

5 Format of Reports
Your report should mainly contain the plant description, control and observer design method
description, your design details, simulation results, possible comparison, comments and discussion,
modification and refinements.
The report should include the following and be organized in the following sequence:
EE5101R/ME5401 Linear Systems Mini-project 2016
7 / 7

 A cover paper to indicate “Assignment for EE5101/ME5401 (or your specialization code if
else) Linear Systems”, a title of your report at your choice, your full name, your
Matriculation number, email address and date;
 An abstract of 50-100 words on a separate page;
 A contents table on a separate page;
 Section1 Introduction
 The major materials of your report organized nicely in a few sections each with specific focus.
Label your equations, tables, and figures with number and caption for reference in the text.
 The last section on conclusions.
 A List of reference books;
 Appendices if any each on a separate page. Your MATLAB code should be in the appendix.
Pay attention to your presentation (English writing, organization, and layout et al). Make the
report formal, complete and readable. It is also advisable to write your report with a word-processing
software such as Word or Latex.
The final point to note about your report: it is the content that matters not the length. Keep in
mind that there are only TWENTY SEVEN pages in John Nash’s PhD thesis, which leaded to his
Nobel Prize. Therefore, you will be penalized if you put too much “copy and paste” material in your
report.

6 A Note on Access and Use of Matlab
To complete the project, you are supposed to use SIMULINK and MATLAB. The easy way is
to learn how to build various block diagrams in SIMULINK first, and then try to solve the control
systems design for the mini-project. An excellent Control Tutorial for MATLAB and Simulink can be
found at http://ctms.engin.umich.edu/CTMS/index.php?aux=Home. Besides, a Matlab manual is
provided in IVLE for the first timers.
If you cannot find MATLAB nearby, please go to PC clusters located at the third floor of E2:
http://www.eng.nus.edu.sg/eitu/pc.html.
Hint on MATLAB/SIMULINK:
A. You can use functions such as step, initial and lsim to simulate the system’s
corresponding response. Also, all these simulations can be done with Simulink.
B. For pole placement, acker is not numerically reliable and starts to break down rapidly
for problems of order greater than 5 or for weakly controllable systems. See place for a
more general and reliable alternative. If you cannot place the poles with the method
taught in your lecture correctly, try to choose different poles or use place. (http://www-
rohan.sdsu.edu/doc/matlab/toolbox/control/ref/acker.html)




51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: abby12468