assignment1_writeup. VIT University Vellore MATHS MAT3003
Programming Exercise 1:
Quadrotor Simulator and PD Controller
1 Introduction
The goal of this programming exercise is to get you familiar with working with the quadrotor simulator and implementing a Proportional Derivative (PD) controller. In Week 1, we
provided you with a quadrotor GUI in which to tune PD control gains. In this ex
...[Show More]
assignment1_writeup. VIT University Vellore MATHS MAT3003
Programming Exercise 1:
Quadrotor Simulator and PD Controller
1 Introduction
The goal of this programming exercise is to get you familiar with working with the quadrotor simulator and implementing a Proportional Derivative (PD) controller. In Week 1, we
provided you with a quadrotor GUI in which to tune PD control gains. In this exercise, you
will have to implement your own PD controller to control the height of a quadrotor, as well
as tune its gains.
Before starting on this programming exercise, we strongly recommend watching the video
lectures, completing the review questions for the associated topics, and reading through this
handout.
To get started, you will need to download the starter code and unzip its contents into
the directory in which you wish to complete the exercise.
2 Quadrotor Simulator
We utilize one of MATLAB’s ODE solvers, called ode45, to simulate the behavior of the
quadrotor.You can read more details at Mathworks or other online resources. We then use
the function plot/plot3 to help visualize the current state of the quadrotor at each time
step. You may take a look at file height_control.m for the simulation code.
Before implementing your own function, you should first try running runsim.m in your
MATLAB setup. If you see a quadrotor falling from the height 0, then the simulator is
running smoothly on your computer and you may continue with other tasks. The supplementary segment \Supplementary Material: Getting Started With the First Programming
Assignment" walks through these steps. The starter code for the controller (controller.m)
produces robot inputs which are all zero thrust and thus the quadrotor falls due to gravity.
3 PD Controller
As you have seen in the lecture, the dynamic equation for the motion of the quadrotor in
the z direction is
z¨ =
u m
[Show Less]