Professional Documents
Culture Documents
In this stage of the project, we assumed that both front and rear wheels of the bicycle model can be
steered.
With this assumption, the state-space model of the system is derived as follows:
̇
�𝑋𝑋 = 𝐴𝐴𝐴𝐴 + 𝐵𝐵𝐵𝐵 1
𝑌𝑌 = 𝐶𝐶𝐶𝐶 + 𝐷𝐷𝐷𝐷
This model has been used both as control-oriented model and the plant for simulation of the controller.
The manipulated variables, front and rear steering angle (𝛿𝛿𝑓𝑓 & 𝛿𝛿𝑟𝑟 ), output variables and MPC weights have
been defined as structures in MATLAB. The steering angle the for front and rear tires are subjected to
conditions to be in range of -20 to +20 degrees which is compatible with most of the steering systems for
vehicles. The MPC controller has been defined using the aforementioned structures plus the time step
duration and the prediction (15) and control (2) horizons.
The flowchart of the simulation has been developed in Simulink. A step input with a magnitude of 2 has
been used as the reference for the vertical position of the vehicle (Y).
The system has controlled the Y position of the vehicle with acceptable accuracy in 5 seconds. This
response is derived using the default weights for the MPC controller.
Table 1 Default MPC weights in simulation
Output Variable [1 1 1 1]
Since the most important variable is the Y position of the vehicle, the weight for this out put has been
enhanced. The corresponding response is as below.
Output variable = [ 1 1 20 1]
This change has decreased the overshoot of the system dramatically and also the response of the system
became faster.
The diagram of the yaw angle and yaw angle rate of the vehicle is illustrated as below:
Figure 5 Left: The variation of yaw angle of the vehicle. Right: The diagram of the yaw angle rat of the vehicle
The behavior of the yaw angle and yaw angle rate of the system is logical since the yaw angle starts at
zero degree and then the vehicle turns to make the lane change. After that, the vehicle must turn the
other way and reaches the zero degree once again so that the vehicle could be aligned with the road
and continue its path in the new lane.
The above diagram shows the variation of control signals (steering angles) of the system. As it can be
seen in the diagram, at the transient part of the maneuver the controller uses the maximum permissible
steering angles to reach the reference and after that these angles become smaller to compensate the
small misalignments.
Moreover, the response of the system to a sinusoidal input has been studied.
Figure 8 response of the system to a sinusoidal reference with 0.5 rad/s frequency
The system has been subjected to a sinusoidal input with 0.5 rad/s frequency and amplitude of 2. As we
can see in the above diagram, the controller is able to follow the reference with a small delay which
could be an acceptable response for a vehicle system.