0% found this document useful (0 votes)
9 views27 pages

R&a List of Experiments - 2025

The document outlines a series of experiments focused on programming techniques for robotic analysis and image processing using MATLAB and Python. Key topics include homogeneous transformation matrices, velocity calculations, arm matrices, backpropagation in neural networks, A* and Dijkstra search algorithms, and image enhancement with Gaussian and Sobel filters. Each experiment includes objectives, theory, required apparatus, procedures, results, and precautions to ensure accurate implementation.

Uploaded by

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

R&a List of Experiments - 2025

The document outlines a series of experiments focused on programming techniques for robotic analysis and image processing using MATLAB and Python. Key topics include homogeneous transformation matrices, velocity calculations, arm matrices, backpropagation in neural networks, A* and Dijkstra search algorithms, and image enhancement with Gaussian and Sobel filters. Each experiment includes objectives, theory, required apparatus, procedures, results, and precautions to ensure accurate implementation.

Uploaded by

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

Experiment 1

Experiment 2

OBJECTIVE: Analysis And Synthesis Of 2dof Planner Robot Using MATLAB


Experiment 3
Experiment 4

Aim:
To perform the fundamental rotation about various axes and evaluate the
homogenous transformation matrix for a given point using different
programming tools

Theory: Homogeneous transformation combines rotation and translation into a


single 4×4 matrix, allowing easy manipulation of points in 3D space.
Fundamental rotations are applied about the X, Y, or Z axis using corresponding
rotation matrices.

Apparatus Required:
1.Computer with suitable programming environment (e.g., Python with
OpenCV library)
2.Suitable programming language (Python and MATLAB implemented)

Procedure:
1. Import Required Libraries
2. Define Rotation Matrices (3×3)
3. Define Homogeneous Transformation Matrix (4×4)
4. Define Point in Homogeneous Coordinates
5. Apply Transformation and give input
6. Print Result and give input as per choice.

Results: The program to implement is shown through below example:


(i)PYTHON
(ii)MATLAB
Precautions:
1. Always convert degrees to radians.
2. Use correct operators and library.
Experiment 5

Aim:
To determine the velocity of a point on a frame using the programming tools
such as Python and MATLAB

Theory:
The velocity of a point on a moving frame can be computed using the time
derivative of its position vector or via the twist (linear and angular velocity) of
the frame. In Python or MATLAB, this involves differentiating the
transformation matrix or applying the Jacobian to joint velocities.
Components:
 Translational Velocity: This is the linear velocity of the frame’s origin
(if the frame is moving).
 Rotational Velocity (ω): This represents the angular velocity of the
frame.
 Position Vector: The vector from the origin of the frame to the point PPP.

Apparatus Required:
1.Computer with suitable programming environment (e.g., Python with
OpenCV library)
2.Suitable programming language (Python and MATLAB implemented)

Procedure:
1. Define the Kinematic Model
2. Assign Joint Variables
3. Compute Matrix (like Jacobian etc)
4. Validate Output and give values as per choice.
Results: The program to implement is shown through below example
with its output: (i)Python
(ii) MATLAB

Precautions:
1. Accurate Jacobian Calculation
2. Handle Angular & Linear Velocities Separately
Experiment 6
Aim:
To determine the arm matrix for the end effector of a robotic structure using the
programming tools such as Python and MATLAB

Theory: The arm matrix (or transformation matrix) defines the position and
orientation of the end-effector relative to the base frame using forward
kinematics. In Python or MATLAB, it is calculated by multiplying the
homogeneous transformation matrices of each joint in sequence.
Standard ARM matrix used in DH parameter:

Apparatus Required:
1.Computer with suitable programming environment (e.g., Python with
OpenCV library)
2.Suitable programming language (Python and MATLAB implemented)

Procedure:
1. Specify the joint angle (θi), link length (ai), link offset (di), and link twist
(αi) for each joint.
2. For each joint, construct the transformation matrix using the DH formula.
3. Extract End-Effector Pose
4. Print output and give values as per choice. This will provide desired arm
matrix.
Results: The Arm Matrix for 2 joints is shown with output generated:

(i) Python

(ii) MATLAB
Experiment 7
Aim:
Write a program to implement Back Propagation technique using the
programming tools such as Python and MATLAB

Theory:
Backpropagation is a supervised learning algorithm used to train neural
networks by minimizing the error between predicted and actual outputs. It
works by using the chain rule of calculus to compute the gradients of the loss
function with respect to each weight and bias in the network, and then adjusting
the parameters using gradient descent.

Apparatus Required:
1.Computer with suitable programming environment (e.g., Python with
OpenCV library)
2.Suitable programming language (Python and MATLAB implemented)

Procedure:
1. Initialize the Network Parameters
2. Define Activation Function (Define Activation Function)
3. Compute the output of each layer
4. Calculate the Loss, using a loss function (typically Mean Squared Error or
Cross-Entropy)
5. Compute the gradients of weights and biases
6. Output Final Weights

Results: Dijkstra’s Algorithm is shown with its output by an example:


(i)MATLAB
(ii)PYTHON

Precautions:

1. Initialize Weights Properly


2. Choose Proper Activation Functions
3. Ensure Proper Backpropagation Flow
Experiment 8
Aim:
Write a program to implement A* and Dijkstra search algorithms using the
programming tools such as Python and MATLAB

Theory:
A* is a heuristic-based search algorithm used for finding the shortest path in a
graph. It combines the benefits of Dijkstra’s algorithm and Greedy Best-First-
Search by considering both the cost from the start node and the estimated cost to
the goal. It uses the formula:
f(n)=g(n)+h(n)
Where:
 g(n)g(n)g(n): Cost from the start node to node
 h(n)h(n)h(n): Estimated cost from node to the goal.

Dijkstra’s algorithm finds the shortest path between nodes in a graph where the
edges have non-negative weights. It iteratively explores the graph by selecting
the node with the smallest tentative distance, updating the neighbours, and
repeating until the goal node is reached.

Apparatus Required:
1.Computer with suitable programming environment (e.g., Python with
OpenCV library)
2.Suitable programming language (Python and MATLAB implemented)

Procedure:
1. Initialize Data Structures:
2. Start with the Initial Node:
3. Select the node with the lowest f(n) value from the open list.
4. Explore Neighbours:
5. Repeat Until Goal is Found or Open List is Empty:
Results: An example for A* for four nodes:
(i)PYTHON
A* FOR 5 NODES

Precautions:

1. Ensure Proper Graph Representation:


2. make sure the algorithm is adjusted accordingly to track all optimal paths.
Experiment 9
Aim:
To enhance images and extract edges using Gaussian and Sobel filters in Python
with the OpenCV library.

Apparatus:
1. Computer with Python installed.
2. Python libraries: OpenCV, NumPy.
3. Sample grayscale images for experimentation.

Theory:
- Gaussian Filter: The Gaussian filter is a low-pass filter that reduces noise and
blurs images by convolving the image with a Gaussian kernel.
- Sobel Filter: The Sobel filter is an edge detection filter used to highlight edges
by computing the gradient magnitude of an image. It consists of two
convolutional kernels for horizontal and vertical edge detection.

Procedure:
1. Image Preparation:
- Load the image using OpenCV's imread function.
- Convert the image to grayscale using OpenCV's cvtColor function if
necessary.

2. Applying Gaussian Filter:


```python
# Import necessary libraries
import cv2
import numpy as np

# Load the image


img = cv2.imread('image.jpg')

# Convert the image to grayscale


gray_img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

# Apply Gaussian filter


gaussian_img = cv2.GaussianBlur(gray_img, (5, 5), 0)
```

3. Applying Sobel Filter:


```python
# Apply Sobel filter
sobel_x = cv2.Sobel(gaussian_img, cv2.CV_64F, 1, 0, ksize=3)
sobel_y = cv2.Sobel(gaussian_img, cv2.CV_64F, 0, 1, ksize=3)

# Compute gradient magnitude


gradient_mag = np.sqrt(sobel_x**2 + sobel_y**2)

# Convert gradient magnitude to uint8


gradient_mag = np.uint8(255 * gradient_mag / np.max(gradient_mag))
```

Result:
- Visualize the original image, Gaussian-filtered image, and Sobel-filtered
image to observe the effects of blurring and edge extraction.
- Assess the quality of edge extraction by comparing the Sobel-filtered image
with the original and Gaussian-filtered images.

Precautions:
1. Ensure proper installation of Python and required libraries.
2. Use grayscale images for edge detection as Sobel filter operates on single-
channel images.
3. Adjust parameters such as kernel size in Gaussian filter and threshold in
Sobel filter to achieve desired results.
4. Handle image data carefully to avoid loss or corruption during processing.
5. Validate results using multiple sample images and document observations for
analysis and reproducibility.

You might also like