VIETNAM NATIONAL UNIVERSITY HO CHI MINH CITY
HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY
REPORT OF SUBJECT: INDUSTRIAL MOTION CONTROL SYSTEM
TOPIC:
CONTROLLING DC MOTOR USING TRAPEZOIDAL VELOCITY PROFILE
Class: CC01 - Semester: 241
Instructor: Phd. Nguyễn Duy Ánh
Student’s Name ID Number
Nguyễn Ngọc Khoa 2053139
HO CHI MINH CITY, 2024
1
Requirement:
Apply the trapezoidal velocity profile to control the position and velocity of the DC motor
from slide 27. There are three points: A, B, and C. The motor should move sequentially
from point A to point B, then from point B to point C. Draw a graph showing the position
and velocity clearly over time.
1. Setting the diagram and try default settings
To satisfy the requirements, here is my diagram in Simulink
Figure 1.1: Simulink diagram using Trapezoidal Velocity Profile block
Firstly, I will keep the Default Setup for the Trapezoidal Velocity Profile block with three
points A, B, C chosen at -10, 9 and 15 accordingly. The Stop Time I choose for this is 3
second
Figure 1.2: Trapezoidal Velocity Profile block parameters
Here is the Velocity and Position Graph after running the system:
2
Figure 1.3: The position graph
Figure 1.4: The velocity graph
The position graph reveals that the motor transitions smoothly from the starting point (0),
initially moving downward to point A at -10. After reaching point A, the motor reverses
direction and moves upward, reaching point B at 9 and then continuing to point C at 15.
The motor’s movements are smooth and controlled, with no abrupt changes in direction or
speed, which indicates effective application of the Trapezoidal Velocity Profile for precise
position control.
3
For the Velocity graph the trapezoidal profile exhibits characteristic phases of acceleration,
constant velocity, and deceleration to reach each point A, B and C
For the motor to get to the A, it first accelerates in the negative direction, reaching a
velocity of -15 units/s. It then maintains at this constant negative velocity for
approximately 0.5 seconds. The motor then decelerates smoothly, bringing the velocity
back to zero, preparing for a direction change.
For the next two waypoints, B and C, the motor's velocity follows a similar pattern.
2. Changing the parameters of the Trapezoidal Velocity block and observe the
results
Now, I will start changing the parameters in the Trapzoidal Velocity block with the
following number:
Acceleration Time = 0.2; The End Time and others still keep at default
Here is the result of the Velocity graph:
Figure 2.1: The velocity graph after changing the Acceleration Time
Because I set the Acceleration time = 0.2, we can observe the the system accelerate and
deaccelerate more sharply than the default setup. Obviously, the constant velocity period
in each segment is longer than default one (0.6 seconds)
4
Next, I will try setting Acceleration Time = 0.2 but with the Peak Velocity = 30
Figure 2.1: The velocity graph after changing the Acceleration Time and Peak Velocity
Since I didn't set the End Time for this, the system automatically adjusted it to match my
setup for Acceleration Time and Peak Velocity. In all three segments, the speed increases
sharply, reflecting quick acceleration, followed by abrupt decelerations. Notably, in the
last segment, there is no constant velocity period, meaning the system accelerates and then
immediately decelerates.
In real life applications, reduce the acceleration time would make the system experiences
higher acceleration rates. Highly dynamic system with minimal smoothing, which can
cause mechanical stress or control challenges due to the sudden transitions
• Robotic Arm (Industrial or Medical Applications)
o If a robotic arm is required to move between two positions at high speed with
a very short acceleration time, the rapid change in velocity can cause a
sudden jerk that leads to mechanical fatigue in the joints, gears, and linkages,
particularly when handling heavy loads.
• CNC Machine (Milling, Cutting)
o CNC machines that cut, drill, or mill materials require precise control over
both the position and speed of the tool to ensure accuracy. If the acceleration
is set too high, the tool head may overshoot its target or induce vibrations,
leading to imprecise cuts and poor surface finishes. Additionally, the tooling
or cutting bit can be subjected to excessive force, causing it to wear out
quickly or even break under the stress
5
• Elevator System
o In an elevator, rapid acceleration can cause a jerky experience for
passengers, leading to discomfort or even injury, particularly for the elderly
or those with mobility issues. Additionally, the sudden forces can put stress
on the elevator’s drive system, cables. As a result, the elevator may require
more frequent maintenance or, in extreme cases, risk system failure,
potentially creating dangerous operating conditions and posing a significant
safety hazard
3. Relationship between Peak Velocity, End Time, and the distance between
waypoints
If I keep the previous setup of Acceleration Time = 0.2, Peak Velocity = 30 but change
the End Time = 1. The system will notify error as in this figure:
Figure 3.1: The error appear when try running the system with the above setup
To explain this error, first I will calculate the distance between waypoints I use. From the
beginning, I always keep the same waypoints of [ 0, -10, 9, 15 ]
- From 0 to -10: Distance = 10 units
- From -10 to 9: Distance = 19 units
- From 9 to 15: Distance = 6 units
The system is checking if the product of PeakVelocity * EndTime / 2 for each segment is
less than or equal to the distance between waypoints. For example, in the first segment, my
Peak Velocity is 30 and EndTime is 1, then:
30 × 1
= 15 > 10
2
In the segment from 0 to -10, the distance is only 10 units. However, the system is
attempting to accelerate and decelerate too rapidly based on the set parameters, and the
calculated distance (15 units) exceeds the actual available distance of 6 units.
So when using the Trapezoidal Velocity Profile to control motor position, it's essential to
carefully consider the distance between waypoints when setting the Peak Velocity and End
Time. These parameters must align with the available distance between waypoints to
ensure the system operates smoothly and avoids errors.
6
4. Using Trapezoidal Velocity Profile to control a 3 DOF SCARA Robot
For this section, I will implement the Trapezoidal Velocity Profile to control a 3 DOF
SCARA Robot in performing a pick-and-place operation. The robot will smoothly
accelerate, move to pick up the object, and then transport it to the designated drop-off
point, ensuring precise and controlled motion throughout the process
Figure 4.1: The Simulink diagram to control the robot
Figure 4.2: The motion of the robot in Simscape animation
7
4.1 Working principle of the system
This system controls a robotic arm by utilizing a Trapezoidal Velocity Profile to generate
a smooth motion trajectory, including position, velocity, and acceleration profiles. The aim
of this system is to control the robot to pickup the object from one place and dropping it in
the other place. The Trapezoidal Velocity Profile ensures that the motion is gradual and
avoids abrupt changes, allowing for controlled acceleration and deceleration phases.
The inverse kinematics block then converts the desired end-effector position from
Cartesian coordinates into the necessary joint angles and prismatic extension to move the
arm. These joint positions are fed into the robot control block, which commands the
actuators to follow the trajectory.
The forward kinematics block calculates the actual end-effector position based on the joint
angles, while the Jacobian matrix computes the corresponding velocities. Throughout the
process, feedback loops compare the desired and actual positions and velocities, allowing
real-time error correction. The use of the Trapezoidal Velocity Profile helps achieve
smooth and precise movements of the robotic arm by optimizing the transition between
acceleration and deceleration phases.
4.2 Setting the Trapezoidal Velocity Profile block
The waypoints I use to input to the Trapezoidal Velocity block is as below:
Figure 4.3: Waypoint trajectory
So the input will be a [8 x 3] matrix and setting the End Time = 0.5 to align with the time
intervals shown in the table, from one waypoint to another will take 0.5 seconds.
8
Figure 4.4: Trapezoidal Velocity block parameters
4.3 Result
Choosing the Stop time = 3.5 seconds, here is the result of position and velocity graph
Figure 4.5: The position graph
9
Figure 4.6 The velocity graph
We can easily observe that for both position and velocity graph, the desired and actual
position closely follow each other. The yellow and blue lines representing the desired and
actual positions, respectively, are almost identical across all three axes (X, Y, and Z),
indicating that the system is accurately tracking the desired trajectory
5. Change the control method of the robot and observe the result
Now, I will replace the Trapezoidal Velocity Profile block with the Signal Editor block
(The input block in the left) to indicating the importance of using Trapezoidal Velocity in
control the 3 DOF SCARA Robot.
10
Figure 5.1: The simluink diagram when replace the Trapezoidal Velocity block
Since the working principle of this diagram is the same as above, so I don’t explain again.
Here is the result of position and velocity graph:
Figure 5.2: The position graph
For this position graph, we can see that when not using the Trapezoidal Velocity Profile,
the system shows sharper transitions, indicating that it is moving more abruptly between
waypoints
11
Figure 5.3: The velocity graph
The velocity graph from the Signal Editor clearly shows a discontinuous behavior, with
abrupt changes in velocity across all three axes (X, Y, and Z). These sudden transitions
between motion states reflect an unrealistic velocity profile that would be impractical in
real-world robotic applications.
In practice, such discontinuous velocity profiles are unachievable because the system
cannot instantaneously jump between different speeds. These abrupt changes would place
significant strain on the robot’s motors, joints, and other mechanical components, leading
to accelerated wear and tear, reduced lifespan, and potentially unstable operation.
For smooth and efficient motion, robots require a gradual acceleration phase where the
velocity ramps up from zero, reaches a desired speed, and then maintains that velocity for
a period before decelerating. This is where Trapezoidal Velocity control becomes essential,
as it ensures smooth transitions between motion states, minimizes mechanical stress, and
provides a more stable and controlled movement.
6. Conclusion
In conclusion, my report have fully satisfied the requirements of using Trapezoidal
Velocity Profile to control the direction of DC motor through 3 points A, B and C
respectively.
12
Initially, I explored the default configuration of the Trapezoidal Velocity block and
observed its effect on both the position and velocity graphs. Following this, I fine-tuned
the block by adjusting parameters such as Peak Velocity, End Time, and Acceleration
Time, while comparing the results before and after these adjustments. During this process,
I highlighted an important constraint—the relationship between Peak Velocity, End Time,
and the distance between waypoints, which must be considered to ensure smooth operation.
Finally, I applied these principles in a practical example, controlling a 3 DOF SCARA
robot using the Trapezoidal Velocity method. This clearly demonstrated the advantages of
this approach over others, particularly in ensuring smooth, precise movements and
reducing mechanical stress.
Throughout this project, I gained valuable insights into motion control and velocity
profiling, and I am confident that my work has laid a strong foundation. However, I
acknowledge that there may still be areas for improvement in my report, and I would
greatly appreciate any feedback to refine my understanding and presentation.
Thank you for the opportunity to explore this fascinating topic!
13