This past week I spent a lot of time working on fixing high frequency noise in the controller. I noticed quite a few oscillations around the setpoint which I hypothesized were being caused by high frequency noise in the gyro that was interacting with the D term. To solve this, I implemented a Exponential Moving Average on the gyro readings in order to smooth them out (although this causes a bit of lag) and implemented a variable gain schedule to provide better stability. We are very close to hovering
Ankit’s Status Report for 11/30/2024
The Thanksgiving Break for me was quite productive. I brought home all of our stuff in order to be able to work on teh project and I made quite a bit of progress. I made two major changes to the software pipeline: 1) the complementary filter implementation we were using originally suffers from drift in the presence of high frequency noise in the gyroscope (which will happen on a drone) and so I properly implemented a kalman filter based approach that results in next to no drift for the IMU and 2) I realized that our original formulation of the PID which was to minimize the error in the angular position of the drone is very unresponsive and not how it is done on professional drones. Instead, these drones implement a rate controller which minimizes the error in angular rate, which is what I changed my PID implementaiton to. With this, our drone is now very stable in both roll and pitch and we are close to trying a hover test after we integrate the radio comms to allow for autonomous takeoff and landing.
We still have about two weeks to demo day and while this is definitely crunch time, I think the immense progress made over the break will help us finish this project.
Ankit’s Status Report for 11/09/2024
This past week was very productive. We started off facing an issue where one of motors seemed to not be spinning. After some diagnosis we realized that this motor was probably dead from an earlier test where it had smoked up, causing us to have to replace the motor. Then, I changed the formulation of our Kalman Filter based state estimation as Kalman Filters require a prediction step that is very hard to encode for through quadcopter dynamics. Instead, I changed to a Complementary Filter, which is a measurement only approach that combines gyro and accelerometer readings essentially through a linear sum. After some quick tuning, this worked very well. Finally, i added in a safety mechanism where if the throttle stick is set to zero, then regardless of the PID outputs the motors stop spinning. This is necessary to ensure our safety during PID testing.
This week will finally all be PID tuning. We will setup a mechanism by which the drone is hanging from a string, fully unsupported, turn on the drone, and hopefully see if balance as we tune the PID gains. I am a little worried about the little time we have to tune both the pitch and roll gains, considering our interim demo is next week, but I do think it is possible.
I believe I am a bit behind schedule as I was hoping to get to PID tuning last week but because of the motor issue and the reformulation of the Complementary Filter, I wasn’t. That being said, I have set aside this entire week to work on PID tuning for the drone, so I think if I put my head down I can make it work.
Ankit’s Status Report for 11/02/2024
This past week was quite productive. I spent the week building the electronics of the frame and getting the motors tested. I started by writing some code to control the ESCs via Arduino PWM and then created a small test setup to verify the motor speed could be varied. Then, I got our transmitter to transmit to the arduino through a receiver, and while our drone is autonomous, this setup will be used to test our PID manually. Finally, me and Bhavik soldered the ESCs to the power distribution board built into teh frame and tested all four motors together. The entire setup works and we now have a drone with motors that spin.
This upcoming week, I will spend time actually tuning the PID and merging in the kalman filter state estimation. The goal is to tune the PIDs for roll and pitch to teh point where we can have stable hover flight, with throttle controlled by the transmitter. I think this will be an ambitious goal, but we should be able to accomplish it.
After the intense progress of this week, I believe I am on track.
Ankit’s Status Report for 10/27/2024
This past week I focused on reformulating the kalman filter. As I stated last week, our original formulation for the kalman filter was entirely wrong and so I spent significant time this week rederiving the dynamics equations for the quadcopter and understanding how to properly incorporate the gyro and accelerometer measurement updates into the state estimate. This led to a very productive week but I need to figure out how to properly tune the process and measurement noise variables in order to ensure that the state estimation does not lag the real variable.
This upcoming week I will focus heavily on tuning the kalman filter. Additionally, now that Bhavik and Gaurav were able to assemble the frame, I will be able to test out my code for controlling the drone motors. This is some boilerplate code I have lying around from a previous project. This should allow us to delve pretty heavily into tuning PID which is the next major step of our project and something that needs to happen quickly so we can get to actual flying testing.
Ankit’s Status Report for 10/20/2024
The week before Fall Break, I spent quite a bit of time on the design report. This included writing a lot regarding the system architecture as well as some of the principal design choices we made regarding the hardware and software of the drone. Additionally, I realized there was a huge problem in the formulation of the kalman filter (essentially in our state update step we were doing a double integration of acceleration to retrieve position, however this is especially error prone to drift and highly not recommended). As a result, I changed the formulation of the kalman filter to include the linear and angular velocity in our state which should make our state estimation a whole lot more stable.
I am currently behind because of this additional work that was needed for the kalman filter but this sort of learning and iteration was expected given that we are designing our own control system and state estimation. I’m hoping to finish up all kalman filter stuff this week then move onto to final integration onto the drone specifically regarding tuning the PID loops. Now that we have hardware in hand, this sort of functional testing is possible and we will be focusing on this over the next several weeks until the demo in November.
Ankit’s Status Report for 10/05/2024
This past week, I continued work on tuning the process and measurement noise for the Kalman Filter and working to interface with the motors. Specifically, this week I looked into the PPM interface and realized that this is quite similar to a PWM implementation. I found some open source code online that generates the PPM signal and used an oscilloscope to verify that the pulses generated make sense. I wasn’t able to test with our actual drone ESCs and motors because the parts have been delayed in arriving but once those come this week I should be able to test.
I will admit I am a bit behind right now. I’m having some trouble understanding how to tune the process and measurement noise for our Kalman Filter. Measurement noise I understand can be empirically calculated through data analysis of our IMU measurements but process noise is something I’m struggling to figure out how to tune. Additionally, our parts not arriving this week has really set us behind. We are hoping to get parts next week.
This week I will focus on hardware testing. We got confirmation from the ECE receiving desk that the parts should arrive this week so I am hoping to actually do the testing this week. If we can get the Kalman Filtering working with drone motor control by end of Fall Break, I’m confident we will be back on schedule
Team Status Report for 09/28/2024
Gaurav did Part A, Ankit did Part B and Bhavik did Part C
Currently, the most significant risk for the team is the viability of our Kalman filter approach to getting Euler angle measurements that don’t drift. In order for our PID to work, we need to have reliable 3DOF measurements and if we cannot correct for the natural integration drift of our gyro, we will not be able to get a stable drone. We believe we have found good resources online that walk us through the process of calibrating our noise in our Kalman filter and they use the same cheap IMU we are using, so we have confidence that we can solve this. Additionally, we are currently worried about getting high-fidelity measurements from our GPS as this depends on weather conditions outside, but there are ways to mitigate this such as setting up RTK base stations. We will have to empirically see if this is necessary based on outdoor testing.
We additionally decided to descope a lot of the custom components we were going to build. We decided that instead of designing and 3D printing our own chassis, we would buy an off-the-shelf carbon fiber frame. This will save us prototyping time and also will be a lot more durable than any 3D printing solution. Additionally, we decided to scrap the custom PCB in favor of a breadboard solution which should save us time in terms of prototyping for a PCB solution.
Part A:
Our product will meet a search and rescue operation need. This has extremely large impacts on safety and welfare. In terms of safety, this product will help search and rescue ships canvas a large amount of area in a much faster time. This means that search and rescue teams can deliver supplies and medical aid much faster and save lives. This will also satisfy the basic needs of people because in lower-income areas where they may not have access to robust search and rescue equipment, this drone will help teams maximize the resources they do have by locating the target much faster and more cost-effectively.
Part B:
With regards to social factors, our low cost solution enables increase in safety regardless of income level of the region. By focusing on a cost effective solution, we are enabling even impoverished regions that border large bodies of water to provide search and rescue. Communities are responsible for the safety of their people and as such, our product is enabling them to provide that regardless of resources that exist in the region
Part C:
Our project addresses the specific need of economic factors because we aim to reduce the overall cost and resources required to perform search and rescue operations. In traditional search and rescue missions, large teams, expensive equipment like helicopters, and significant fuel consumption all contribute to a high operational cost. Therefore, by including an autonomous drone-based solution, we can significantly reduce these costs. Out autonomous drones will allow these rescue missions to include fewer people and reduce the need for equipment such as helicopters. Additionally, the production and distribution of the drone will be open source and can be easily used by any team. Since the cost of the drone is also cheaper compared to traditional drones, it makes it easier for teams in lower-income areas to utilize.
Ankit’s Status Report for 09/28/2024
This week, I worked with my teammates to finalize most of the mechanical and electrical design of our quadcopter. We decided to scale back slightly the scope of our design. Instead, of 3D printing a frame, we decided to buy one instead and we are no longer designing our own PCB, but rather using a breadboard instead. Power distribution will happen through an off-the-shelf PCB. I also continued to refine the Kalman Filter we are using in order to provide more stable 3-DOF measurements and began to interface with the ESC + motors to prove that we can control the motor speed through the Teensy.
I think I am a bit behind schedule. I was hoping to have proven that we can control the speed of our motors and receive high fidelity measurements from our GPS this week, but because of other work and issues with connecting to our GPS, I was not able to hit this target. As a result, this upcoming week, I hope to finalize our plan to have high fidelity control of our drone motors, get GPS measurements streaming to our teensy, and get the radio receiver working as well. This will be a long endeavor as I will have to learn about the PPM protocol and figure out how to format those packets from the teensy
Ankit’s Status Report for 09/21/2024
This week I worked with Bhavik to get the MPU6050 up and running and investigate some basic Kalman Filter logic to fuse its gyroscope and accelometer data together to get precise 3-DOF measurements for the drone. I started by soldering header pins to the MPU6050 then wired it up according to a schematic we found on a SparkFun guide. Then, we loaded some basic example code that showed us how to interface with the device via I2C and poll raw angular velocity and linear acceleration data. We could then do some basic trig to figure out the euler angles using the linear acceleration data and do some basic integration to convert the gyro data into euler angles. We plan to continue work on a Kalman Filter based approach to fuse these measurements together along with a dynamics model of the quadcopter in order to get precise, non-driftin measurements of the euler angles of our drone at all time. I also worked with Bhavik and Gaurav to finalize a parts list for the drone and place some preliminary orders for the devices we will need (sensors, Teensy, drone motors + ESCs, etc.)
I am currently on schedule and will be focusing on figuring out more of teh Kalman Filter + tuning the process and measurement noise in order to get very accurate readings of our euler angles