Stewart Platform Courseware Overview
Stewart Platform Courseware Overview
net
[Link] info@[Link]
COURSEWARE
STEWART PLATFORM
©2018 Acrome Inc., All rights reserved.
Acrome Inc.
ITU ARI4 Science Park
Maslak, Istanbul
Turkey
info@[Link]
Phone: +90 532 132 17 22
Fax: +90 212 285 25 94
Printed in Maslak, Istanbul
For more information on the solutions Acrome Inc. offers, please visit the web site at:
[Link]
This document and the software described in it are provided subject to a license agreement.
Neither the software nor this document may be used or copied except as specified under the
terms of that license agreement. All rights are reserved and no part may be reproduced, stored
in a retrieval system or transmitted in any form or by any means, electronic, mechanical,
photocopying, recording, or otherwise, without the prior written permission of Acrome Inc.
ACKNOWLEDGEMENTS
Special thanks to Acrome myCONTROL Team for their supports in embedded control and
preparation of the courseware.
1 Introduction ........................................................................................................................ 5
4.2.2 In-Lab Exercise: Calculating the Full Rotational Matrix for Stewart Platform ..... 18
7 Programming..................................................................................................................... 35
References ................................................................................................................................ 41
1 Introduction
1.1 Definition of a Robot
Definition of a robot is a controversial issue even among roboticists. The science fiction version
of a robot is an android, or a humanoid machine whereas the definition of robot for the industry
is the automated machine that is efficient and repetitive. International Organization for
Standardization defines robot as “an automatically controlled, reprogrammable, multipurpose
manipulator with three or more axes.” (ISO, 2018) The Robot Institute of America designates a
robot as “a reprogrammable, multifunctional manipulator designed to move material, parts,
tools, or specialized devices through various programmed motions for the performance of a
variety of tasks.”(RIA)
Figure 1.1: Logos of International Organization for Standardization (left) and Robotic Industries
Association (right)
5
1.2 Parallel Manipulators and Stewart Platfrom
Machines which using power to complete a task that comprises forces and movement named
as mechanical systems. The word “Mechanical” comes from machina “machine, engine,
expedient and remedy” which is a Latin word. [1]
Serial manipulators are one of mechanical systems, structured with serial-chains from the base
to an end-effector.
Parallel manipulators however, use several serial-chains to prop a single platform or end-
effector. The most popular parallel manipulator is designed with six linear actuators that prop
a holdable base for specific tasks such as flight simulators. Named as the Stewart Platform. [2]
Stewart Platfrom systems are gnarled robots that use uniform mechanisms to move for both
the robot base or one and more arms they have. “Parallel” definition comes with the working
process. The way serial arms moving simultaneously to lead the base seperately at the same
time defined as “Parallel” operations. No geometrical parallelism is implied.
6
1.3 Uses of Stewart Platforms
No matter Stewart recommended his mechanism to use with flight simulators, he also
suggested alternatives to use that mechanism like:
A stable platform mounted on a vessel (for example a ship) which can keeps its
orientation and position against random movements of the sea.
A new kind of machine tool
Programmable assembly or transfer machine
Also people who read Stewart’s article had possible uses for Stewart Platform. G.H. Meier
suggested that machine tool and medical fields are applicative areas to use Stewart Platform.
[3] In the other hand, Meier claimed that the platform could be useful for machine tools with
an extra rotating table mounted on the platform to gain 360 rotation.
The second idea of Meier is a stabilizing platform, where the platform can eliminate
environmental effects such as rotational and linear motions. For example with this platform,
making stabilized hospital ships could be possible where doctors can perform delicate
operations. With the same logic, gun platforms in warships would be possible.
7
2 Components of Stewart Platform
Acrome Stewart Platform contains 6 Actuonix P16-P linear actuators. Also there are 12 cardan
joints, 3 special design ball bearing housings as mechanical parts. Both base and platform plates
are made from plexi-glass. Acrome Stewart Platform can carry up to 180N weight.
MyRIO microprocessor which is made by National Instruments and Linear Actuators are
powered by Acrome Power Distribution Box that also stores motor drivers.
Figure 2.1: 1-Actuonix L16-P linear actuator 2- Cardan Joint 3- Bearing Housing 4- Platform Plate
5-Base Plate 6- Power Distribution Box 7- MPU-6050 (Gyro + Accelerometer)
8
2.1 Actuonix P16-P Linear Actuator with Feedback
The P16 is the next generation of actuator from Actuonix Motion Devices. It boasts a compact
side by side design with a planetary gearbox These units offer higher speeds, higher forces and
longer life than other units.
The P16-P series actuators offer an analog position feedback signal that can be input to an
external controller.
9
2.2 MPU-6050 Six-Axis (Gyro + Accelerometer)
The MPU-6050™ parts are the world’s first Motion Tracking devices designed for the low
power, low cost, and high-performance requirements of smartphones, tablets and wearable
sensors.
The MPU-6050 devices combine a 3-axis gyroscope and a 3-axis accelerometer on the same
silicon die, together with an onboard Digital Motion Processor™ (DMP™), which processes
complex 6-axis Motion Fusion algorithms. The device can access external magnetometers or
other sensors through an auxiliary master I²C bus, allowing the devices to gather a full set of
sensor data without intervention from the system processor. The devices are offered in a 4 mm
x 4 mm x 0.9 mm QFN package.
The InvenSense MotionApps™ Platform that comes with the MPU-6050 abstracts motion-
based complexities, offloads sensor management from the operating system, and provides a
structured set of APIs for application development.
For precision tracking of both fast and slow motions, the parts feature a user-programmable
gyro full-scale range of ±250, ±500, ±1000, and ±2000 °/sec (dps), and a user-programmable
accelerometer full-scale range of ±2g, ±4g, ±8g, and ±16g. Additional features include an
embedded temperature sensor and an on-chip oscillator with ±1% variation over the operating
temperature range.
10
2.3 DRV8848 (Dual H-Bridge Motor Driver)
The DRV8848 provides a dual H-bridge motor driver for home appliances and other
mechatronic applications. The device can be used to drive one or two DC motors, a bipolar
stepper motor, or other loads. A simple PWM interface allows easy interfacing to controller
circuits.
The output block of each H-bridge driver consists of N-channel and P-channel power
MOSFETs configured as full H-bridges to drive the motor windings. Each H-bridge includes
circuitry to regulate the winding current using a fixed off-time chopping scheme. The
DRV8848 is capable of driving up to 2 A of current from each output or 4 A of current in
parallel mode (with proper heat sinking, at 12 V and TA = 25°C).
11
2.5 Arduino Mega 2560
Arduino is a portable embedded device that allows users to design and control robotic or
mechatronic systems.
The Arduino Mega 2560 is a microcontroller board based on the ATmega2560. It has 54 digital
input/output pins (of which 15 can be used as PWM outputs), 16 analog inputs, 4 UARTs
(hardware serial ports), a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP
header, and a reset button
12
3 Pulse Width Modulation
Pulse Width Modulation Technique is mainly used in industry. The technique produces
analog signals by using digital signals. It can be easily produced and applied. As for the Linear
Actuators, it uses simple on/off pulsed signal. With respect to its input signal, Linear Actuator
changes the velocity of motor and returns leg length as an output. As a result, Pulse Width
Modulation and Linear Actuator complement each other well.
PWM technique produces a square PWM signal that has several properties like period,
frequency, amplitude and duty cycle. Period is the time interval required to repeat the signal
and frequency is the number occurrences of these signals in 1 second. Amplitude shows the
voltage level of the high or low state of the PWM signal. Duty cycle is used to describe high
state of the signal as a percentage of the total period and finally, pulse width is the time that
signal is at the high state.
A typical PWM signal and its properties are shown in the Figure 3.1:
13
3.1.1 In Lab Exercise
1. Open “[Link]” where Figure 3.2 shows its front panel.
4. Double click and open Read Signal and Write Signal Scope. Observe simulated PWM
from the oscilloscope,
5. Compare the consistency of the performance obtained from sliders and scopes.
14
4 Parallel Kinematics
Kinematics is the branch of mechanics concerned with the motion of objects without reference
to the forces which cause the motion. Within the science of kinematics, one studies the
position, the velocity, the acceleration, and all higher order derivatives of the position variables
(With respect to time or any other variable(s)).
This chapter takes into consideration the position and orientation of the manipulator links in
static situations to reach the end effector's position and orientation values depending on the
base of the manipulator.
Numbering the links starts with the base of the arm which is nonmoving and called link 0. After
that, the first moving body becomes link 1 and so on. Generally, manipulators have five or six
joints but in order to position an end-effector generally in 3-space, minimum six joints are
required. [4]
15
4.2 Kinematics of Stewart Platform
The Base is described as the reference frame work with x, y and z orthogonal axes. Also the
Platform has its own orthogonal coordinates as x’, y’ and z’. Thus the platform has 6 linear
actuators, the Platform has 6 degrees of freedom (DOF) depends on the Base.
Three translational displacements defines the origin of the Platform coordinates depends on
the Base, one for each axis.
Also there are three angular displacements defines the orientation of the platform respect to
the base. The description of Euler angles explained as:
If we take a look at the first rotation (Yaw angle) around the z-axis:
(4.1)
16
We define the rotation matrix Rz (ψ) where,
(4.2)
With the same approach, if we want to define the pitch angle rotation, we can show as
(4.3)
(4.4)
The full rotation matrix of the Platform relative to the Base is then given by:
(4.5)
17
4.2.2 In-Lab Exercise: Calculating the Full Rotational Matrix for Stewart Platform
1. Open the “CalculateOrientationMatrix_Student.slx”
2. You will see that the Run button is on block diagram toolbar.
3. Now, click the Run button. Diagnostic Viewer window will appear and will list all errors.
Check the errors and warnings. You can click the error from the list (written and
underlined with blue) to navigate MATLAB code
18
4. After clicking, you will see the MATLAB code of
“CalculatingOrientationMatrixStudent.m” as in Figure 4.5
5. To run the program, fill in the blanks in MATLAB code. The color of the wrong lines in
MATLAB code is red. All expressions for the codes are explained in Equation 4.5.
6. To check the defined variables, we have three different angles and the corresponding
coordinates of these angles. Run the Simulink model and enter the angles respectively.
When the listed angle values are entered the Parameters of the Stewart Platform, you
should read the below x, y and z values.
1 0 0
{0,0,0} → {0 1 0}
0 0 1
0.86 0 0.5
{0,30,0} → { 0 1 0 }
−0.5 0 0.86
Figure 4.8: Frame Assignment of the Robot Wrist Figure 4.9: Vector Diagram of ith actuator
20
origin with respect to Frame {B}. Now if we denote the angle between PPi and xp by λi, and the
angle between BBi and xB by Ai for i = 1, 2 . . . . . 6, then by inspection we obtain:
(4.6)
And
(4.7)
Furthermore, if vector Ppi = (pix Piy piz)T describes the position of the attachment point P+ with
respect to Frame {P} and vector Bbi = (bix biy biz)T the position of the attachment point B+ with
respect to Frame {B}, then they can be written as:
attatchement frame on Platform frame P
(4.8)
And
attatchement point on base frame B
(4.9)
for i = 1, 2 . . . . . 6 where rp and rb represent the radii of the payload and base platforms,
respectively. We proceed to consider the vector diagram for an ith actuator given in Figure 4.9.
The position of Frame {P} is represented by vector Bd = (x y z)T which contains the Cartesian
coordinates x, y, z of the origin of Frame {P} with respect to Frame {B}. The length vector
Bqi = (qix qiy qiz)T, expressed with respect to Frame {B} can be computed by:
(4.10)
(4.11)
21
shifted payload cordinates
(4.12)
(4.13)
(4.14)
which is the representation of Bpi in Frame {B} and BPR is the orientation matrix representing
the orientation of Frame {P} with respect to Frame {B}. Thus the length li of vector Bqi can be
computed from its components as:
leg length vector magnitude
(4.15)
Or
(4.16)
(4.17)
22
(4.19)
And
(4.20)
(4.21)
for i=1, 2 . . . . . 6.
Equation (4.21) represents the closed-form solution to the inverse kinematic problem in the
sense that required actuator lengths li for i = 1, 2 . . . . . 6 can be determined using (4.21) to
yield a given Cartesian configuration composed of Cartesian position and orientation of Frame
{P} with respect to Frame {B}. [5]
23
5 Trajectory Generation
5.1 Introduction
In general, a trajectory or path describes the desired motion of a manipulator in
multidimensional space. In robotics, trajectory is defined as a time history of position, velocity,
and acceleration for each degrees of freedom. Here, the basic problem is trajectory generation
which refers to how to design the trajectory in joint space from the initial point to the final
point. In order to solve this problem, we assume that we can compute the desired joint angle
for the final point of the end effector. In other words, each point is converted into a set of
desired joint angles, 𝜃(𝑡). This conservation is called inverse kinematics.
Trajectory generation occurs at run time; in the most general case, position, velocity, and
acceleration are computed. These trajectories are computed on computers in discrete time so
the trajectory points are computed at a certain rate, called the path-update rate. In typical
manipulator systems, this rate lies between 60 and 2000 Hz.
The motion between the tool frame and the station frame consists of changes in orientation
and position. The current value and final value of tool frame, via point and stationary frame is
shown in Figure (5.1).
24
Figure 5.1: Tool Frame and Stationary Frame of the Manipulator
It is necessary to give more details to specify the motion and simply stating the desired final
configuration. First method is giving a sequence of desired via points that are intermediate
points between the initial and final positions. In this way, the tool frame moves through a set
of intermediate positions and orientations described as via points. Path points consist of final,
initial and all via points. Each of these points are actually a frame that specifies both the position
and orientation of the tool relative to the station.
There are three constraints on temporal attributes of the motion such as the time elapsed
between via points, the smoothness of the path and the spatial constraint. In order to
guarantee smooth paths, we must put some sort of constraints on the spatial and temporal
qualities of the path between via points. We will define a smooth function. A smooth function
is continuous and has continuous first and second derivative functions. At this point, there are
many choices for a path to be specific and planned.
Trajectory planning can be verified by two different ways: joint space and Cartesian space
schemes. In the following chapter, we will define these schemes and explain the differences
between these.
25
5.3 Cartesian Space Schemes
In Cartesian space, path generation is described in terms of functions of x, y and z coordinates.
The joint angles are repeatedly calculated through inverse kinematics equations of the Stewart
Platform. As mentioned before, the Cartesian reference frame of the Stewart Platform is the
projection of the center of first joint on the base plate. Therefore, Cartesian space trajectories
moves relative to this reference frame.
Each axis moves independently so there are six trajectories for the Stewart Platform. There are
advantages and disadvantages for Cartesian space schemes. The motion between the initial
and final points is known at each instant of time and it is controllable. The motion is also visual,
so it is easy to describe. However, a singularity may occur at any point. We cannot be sure that
there will be no singular in the trajectory.
angle and the goal angle of the manipulator. We try to find the function where the values are
the initial joint angles at 𝑡0 and where the values are the goal joint angles at 𝑡𝑓 . This process is
applied for joint space schemes.
Similarly, in Cartesian space scheme, we know the initial angles of the motors and the end-
effector. The goal position is the desired position to move. We try to find the function where
the value of the function is the initial position at 𝑡0 and where the value of the function is the
goal position at 𝑡𝑓 .
Position, velocity, and acceleration in Cartesian space corresponds to angle, joint velocity, and
joint acceleration in joint space respectively. Therefore, the equations calculated for the joint
space also applies to the Cartesian space. In this chapter, we will use position, velocity, and
acceleration terms for both the space schemes.
26
There are many smooth functions that are different than each other between two points. They
are shown in Figure 5.2. To obtain a cubic polynomial, four constraints are needed. The initial
and the goal position of the manipulator are two constraints:
The other constraints come from velocity. The final and the initial velocities have to be zero, so
our desired trajectory has to satisfy the following constraints:
𝜃(𝑡) = 𝑎0 + 𝑎1 𝑡 + 𝑎2 𝑡 2 + 𝑎3 𝑡 3 (5.3)
If the cubic polynomial is derived two times respect to time, we obtain velocity and acceleration
of the manipulator:
𝜃(𝑡) = 𝑎0 + 𝑎1 𝑡 + 𝑎2 𝑡 2 + 𝑎3 𝑡 3
(5.4)
𝜃̇(𝑡) = 𝑎1 + 2𝑎2 𝑡 + 3𝑎3 𝑡 2
27
𝜃̈(𝑡) = 2𝑎2 + 6𝑎3 𝑡
When four constraints are applied to the equation 5.3 and 5.4, we obtain:
𝜃0 = 𝑎0 = 0
𝜃𝑓 = 𝑎0 + 𝑎1 𝑡𝑓 + 𝑎2 𝑡𝑓 2 + 𝑎3 𝑡𝑓 3
(5.5)
0=𝑎1
0 = 𝑎1 + 2𝑎2 𝑡𝑓 + 3𝑎3 𝑡𝑓 2
Solving these equations for the coefficients of cubic polynomial, we also obtain:
𝑎0 = 𝜃0
𝑎1 = 0
3
𝑎2 = (𝜃 − 𝜃0 ) (5.6)
𝑡𝑓2 𝑓
2
𝑎3 = − (𝜃𝑓 − 𝜃0 )
𝑡𝑓3
28
[Link] In-Lab Exercise: Cubic Polynomials for Single Point
1. A single-link robot is at 𝑑 = 0 millimeters. It is desired that the joint of the robot will
move 𝑑 = 40 millimeters by the end of two seconds. Find the cubic polynomial
coefficients.
2. Open “[Link]” under the Trajectory folder that is shown in Figure 5.3
and configure the initial and the final theta values. Observe the graphs.
29
2. Position, velocity and acceleration graphs are shown in Figure (5.4) .
30
𝜃(𝑡) = 𝑎0 + 𝑎1 𝑡 + 𝑎2 𝑡 2 + 𝑎3 𝑡 3 + 𝑎5 𝑡 4 + 𝑎5 𝑡 5 (5.9)
Where the constraints are given as:
𝜃0 = 𝑎0
𝜃𝑓 = 𝑎0 + 𝑎1 𝑡𝑓 + 𝑎2 𝑡𝑓 2 + 𝑎3 𝑡𝑓 3 + 𝑎4 𝑡𝑓 4 + 𝑎5 𝑡𝑓 5
𝜃̇0 = 𝑎1
(5.10)
𝜃𝑓̇ = 𝑎1 + 2𝑎2 𝑡𝑓 + 3𝑎3 𝑡𝑓 2 + 4𝑎4 𝑡𝑓 3 + 5𝑎5 𝑡𝑓 4
𝜃̈0 = 2𝑎2
These constraints specify a linear set of six equations with six unknowns, whose solutions are:
𝑎0 = 𝜃0
𝑎1 = 𝜃̇0
𝜃̈0
𝑎2 =
2
31
5.3.3 In-Lab Exercise: Stewart Platform Trajectory Example
Double-click on "StewartPlatform_withTrajectory.slx" under the Trajectory folder to open the
simulink model. Front panel of “StewartPlatform_withTrajectory” shown in Figure 5.5.
32
6 Control System Design
6.1 PI Controller
A variation of Proportional Integral Derivative (PID) control is to use only the proportional
and integral terms as PI control. The PI controller is the most popular variation, even more than
full PID controllers. The value of the controller output u(t) is fed into the system as the
manipulated variable input.
The 𝑢𝑏𝑖𝑎𝑠 term is a constant that is typically set to the value of 𝑢(𝑡) when the controller is
first switched from manual to automatic mode. This gives "bumpless" transfer if the error is
zero when the controller is turned on. The two tuning values for a PI controller are the
controller gain, 𝐾𝑐 and the integral time constant𝑇𝚤. The value of 𝐾𝑐 is a multiplier on the
proportional error and integral term and a higher value makes the controller more aggressive
at responding to errors away from the set point. The set point (𝑆𝑃) is the target value and
process variable (𝑃𝑉) is the measured value that may deviate from the desired value. The error
from the set point is the difference between the SP and PV and is defined as 𝑒(𝑡) = 𝑆𝑃 − 𝑃𝑉.
In Stewart platform, “Set point” is the destination position of each linear actuator and the
“Process Variable” is the instant position value that comes from the sensor (potentiometer) of
each motor. The difference between set point and process value for each iteration named as
“Proportional Error” and the sum of each proportional errors named as “Integral Error”. There
are two gain constants for both proportional and integral errors. All errors get multiplied with
related Gain constant and sum of these values are used to change PWM values of linear
actuators. There are also two saturating operation for both proportional and integral errors to
keep them in a range and neglect aggressive motor motion.
33
Figure 6.2: Closed Loop PI Controller
The algorithm in the PI Controller block in Figure 6.3 does the following:
As the inputs. Then uses the sum of saturated errors to control PWM data and effects the
motion of motor.
34
7 Programming
This chapter explains how to open the Matlab Project of Acrome Stewart Platform and run the
[Link] program.
Before starting, please be sure all the wiring process is completed and Arduino Due is
connected.
You can check entire wiring process from the “User Manual”.
Open Matlab and select Stewart Platform >> Code in "Current Folder".
Double Click on [Link]
35
7.1 Stewart_Platform Simulink Model
Please click on “Stewart_Platform.slx” to open. Front panel of “Stewart_Platform” shown in
Figure 7.2.
Enable Motors button gives power for each six linear actuators when button is ON. Similarly
cuts off the power when the button is OFF.
There are two displays in the right-bottom corner of the front panel. They indicate the set
positions and actual motor positions.
At the left-top corner of the front panel, program has mode structure to control the Stewart
Platform. Structure has three modes named as “Manual Control”, “Circle” and “Vibration”.
At Manual Control mode, there are six sliders to change X-Y-Z positons and roll-pitch-yaw
orientation angles. User can slide the node on the slider to change values, or also can use the
digital display on the right to insert constant values.
36
In “Circle” mode, there is a simple program that changes X-Y positon and Roll-Pitch Orientation
values for a circular path.
With Radius input, user can change the radius of the circular move.
With Speed input, user can change the speed of the path.
There is a radio button with two options at the top of the front panel. User can apply
the circular move for position or orientation.
When the user presses the Play button, the circular move starts.
When the Simulink model is in Vibration mode, simulates vibration tests in the industry. The
object on the Stewart Platform is tested for vibration. The motors move at high frequency and
provide vibration on the platform.
38
7.3 Device Parameters
In Stewart Platform program, there are some of preset values and variables that affects the
behaviour of the device. Here, all the preset values and variables are listed.
39
List 7.2:”Platform Parameters” cluster in Device Parameters
Name Description Data Type
Desired Position Values that comes from Double Array
Motor Set Positions
solution algorithms with 6 elements.
Actual Position Values that has been Double Array
Motor Actual Positions
read from motor feedback with 6 elements.
A control that resets the sum of
Reset Integrator Boolean Input
Integrator value of Control Algorithm.
Pulse Width Modulation Duty Cycle
Double Array
Motor PWM Duty Cycles values that drive linear actuators to keep
with 6 elements.
motors in desired lengths.
Variables that power-on motors with
Boolean Array
Enable/Disable Motors “High” value and power-off motors with
with 6 elements.
“Low” value.
Variables that indicate roll-pitch-yaw Double Array
Platform_Orientation
values of the center of Platform Plate. with 3 elements.
Variables that indicate X-Y-Z position Double Array
Platform_Position
values of the center of Platform Plate. with 3 elements.
Orientation Matrix that includes
40
References
1) The American Heritage Dictionary, Second College Edition. Houghton Mifflin Co., 1985.
2) Merlet, J.P. (2008). Parallel Robots, 2nd Edition. Springer.
3) Review of Stewart Platforms. Universiteit Van Pretoria
41