0% found this document useful (0 votes)
34 views10 pages

METR4202 Lab 1 v1.1

Uploaded by

songpengyuan123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views10 pages

METR4202 Lab 1 v1.1

Uploaded by

songpengyuan123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

METR4202 - Robotics & Automation

Lab 1: Introduction to Robotic


Simulations with Quanser

Notes
Questions will be in blue, and similar questions may be asked on your quizzes
throughout the semester.
Some exercises have been adapted from Quanser’s exercises.
You can find the content here.

Topics Covered
• Configuration Space

• PWM Control
• Position Control
• Quanser Software Introduction

Prerequisites
• Simulink and MATLAB (2019 or above)
• Understanding of DOF and Configuration Space

Objective
The objective of this laboratory is to familiarise yourself with the robotics simu-
lation software we will be using this semester: QLabs Robotics by Quanser.
For the first set of practicals we will be using a simulation of the QArm, which
is a 4-DOF serial robotic manipulator. Additionally, we will be covering the
basic theory behind robotic configurations, e.g. DOF and configuration space.

1
Lab 1 METR4202 - Robotics & Automation

1 Background
1.1 Serial Manipulators
The QArm robot is a serial manipulator, so we will need to understand what a
serial manipulator is, as well as the functions it can do.
We can break down a serial manipulator into a number of components:
• Joints
• Links

• Base
• End Effector
(P1-Q1)
Describe the purpose of each of the components above.

(P1-Q2)
Draw a simple diagram illustrating a manipulator, with components labelled.
Lab 1 METR4202 - Robotics & Automation

1.2 Degrees of Freedom


1.2.1 DOF of a Rigid Body
The DOF is the minimum number of parameter you need to completely specify
the configuration.
We will first look at rigid bodies.
A rigid body is a collection of particles of mass that conserves the distance
between points, and the cross product between any two connected segments,
(hence conserving ‘signed’ angles).
In the case of 2D or planar rigid bodies, we can theoretically determine the
degrees of freedom for this.
We will pick three points on this 2D rigid body.

xA , xB , xC

kxB − xA k = dAB , kxC − xB k = dBC , kxC − xA k = dAC


(xA − xB ) × (xC − xB ) = vABC
In 2D, the cross product can be used to find the signed angle, since the k
component will be zero always. We can begin this process, by picking a position
in the world space (2D), for xA .
There are 2 parameters which specify the placement of xA , since we can place
it anywhere on the 2D plane because there are no constraints on this.
So we have 2 degrees of freedom at this point. Next, we need to select a point
for xB , and can pick anywhere on the 2D plane, such that kxB − xA k = dAB
is conserved.
This defines a circle of radius dAB , around xA for the potential points for xB ,
which limits it to a single DOF, for this.
So now we have 3 degrees of freedom at this point.
Finally, we can select a point for xC anywhere on the plane that satisfies both
the distance and angle constraints.
Since both xA and xB are defined, we have to find a point that satisfies:

kxC − xB k = dBC , kxC − xA k = dAC

This will limit us to one of two points, but with the constraint

(xA − xB ) × (xC − xB ) = vABC

this will limit us to a single point on the plane.


So we have no degrees of freedom for this.
In total, we have 3 degrees of freedom for a 2D rigid body.
In practice, these don’t have to be 3 points, and can instead be defined as the
position (x, y) and orientation (θ).
Lab 1 METR4202 - Robotics & Automation

Now, we will go through this process in 3D.

(P1-Q3)
List some ways we can represent a rigid body’s configuration in 3D.
• 3D Position + Euler Angles


(P1-Q4)
Describe some issues with certain representations of a configuration.
(E.g. problems with Euler Angles).
Lab 1 METR4202 - Robotics & Automation

1.3 DOF of a Robot


A robot can also have degrees of freedom, in its configuration.
The rigid bodies that make up the links of a manipulator have freedom in the
way that they are positioned and oriented, and also have physical restrictions
determined by the geometry of the links as well as the joints.

1.3.1 Joints
There are a number of types of joints which can restrict the motion of the links.

Figure 1: Joints
Source: Modern Robotics by Kevin M. Lynch and Frank C. Park

The two types joints that will be focused on in this course are:
• Prismatic (Linear Motion ↔ Translation, 1-DOF)
• Revolute (Circular Motion ↔ Rotation, 1-DOF)

(P1-Q5)
How many degrees of freedom does the following manipulator have?

Figure 2: PUMA Manipulator


Source: Modern Robotics by Kevin M. Lynch and Frank C. Park
-DOF
Lab 1 METR4202 - Robotics & Automation

2 In-lab Exercise
Task 0: Setup
The aim of this task is to setup the QLabs environment, which you will be using
alongside Simulink. You can complete some of these steps before the practical.
1. Make sure you have MATLAB version 2019 or newer.
2. Download the QLabs Software here.
3. Open up the QLabs Software (Quanser Interactive Labs).

4. Create an account on Quanser:


(a) Register as a new user
(b) Important: use sxxxxxxx@student.uq.edu.au
(c) Verify your email address

Figure 3: QLabs Robots


Lab 1 METR4202 - Robotics & Automation

Task 1: PWM
Recall that PWM (Pulse Width Modulation) can be used to deliver variable
power by altering the duty cycle.
In this application, PWM is used to control the actuation of the four joints on
the QArm.

1. In the Simulink model BasicIO pwm mode.slx, run the simulation with
QLabs open to the QArm Workspace.
2. In QLabs, make sure that PWM mode is on, in the settings.

3. Have a go toggling the various switches and changing the duty cycle on
the Simulink model and see the effect that this has on the movement of
the QArm.
4. Try toggling the gripper command.

5. Discuss how this sort of control system might be implemented with electric
motors, and an MCU.

Figure 4: QArm Workspace


Lab 1 METR4202 - Robotics & Automation

Task 2: Position
We can control the positions of the configuration, which in this case are the
joint angles for the base, shoulder, elbow and wrist.
You can change the angles for each of the joints by changing the respective
square wave blocks.
1. In the Simulink model BasicIO position mode.slx, run the simulation
2. Make sure that position mode is on.
3. Play around with the joint angles

4. Discuss how this sort of position control would be implemented using a


built-in controller.
5. What are the different applications of position and PWM control?

Task 3: Position Control


1. In the Simulink model LowLevelControl.slx, run the simulation
2. You will notice that the QArm manipulator will begin to collapse due to
gravity, since

3. Stop the simulation for now


4. Go into the controller block, and design a PID controller using only the
blocks provided. You will need to select the gains appropriately. Hint:
Look at the scope block for the joint angles over time.

5. Run the simulation again.


6. Adjust based on the performance of your controller, as needed.
Lab 1 METR4202 - Robotics & Automation

3 Q&A
Feel free to ask the tutors any questions about the practical, or about the course
content.
We can also go through questions relevant to the mini-quizzes, especially from
the textbook.
Lab 1 METR4202 - Robotics & Automation

4 Mini-quiz Preparation
Some extra questions are provided below, as additional preparation for the mini-
quizzes.

(1)
For each of the following
i) Describe the topology of the configuration space.
ii) State the DOF.
iii) Describe the workspace topology, i.e. the reachable workspace.
(Assume no constraints)
iv) Describe any singular configurations (for manipulators)
————————————————————————————
a) A BB (ball-ball) serial manipulator.

b) A planar RR (revolute-revolute) serial manipulator.


c) A pole-cart setup
d) An adjustable metronome

e) A 3D pendulum (universal joint)

(2)
1. Write out the matrix representation of a 2D counter-clockwise rotation.

2. Modify this to write out the matrices for 3D rotations about:


• î / x axis
• ĵ / y axis
• k̂ / z axis
These rotations are counter-clockwise (as given by the right-hand rule).
Hint: Recall that an eigenvector of a rotation is the axis of rotation, and
the columns of a matrix represent the transformed basis vectors.

(3)
Show that

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy