Skip to content

UCLA-Rocket-Project/cmfv-closedloop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CMFV Closed Loop Controller

This repo contains the embedded code on the Arduino MCUs which are hooked up to the CMFV encoder and stepper motor for closed loop control during engine static fires.

It expects to receive pressure data through Serial from some source (a frequency of 100Hz will likely be more than sufficient), and sends telemetry back through that connection at a rate which can be specified in the CommConfig struct of include/config.h.

The packet formats for the abovementioned Serial communication can be found in lib/modules/include/comm_handler.h.

Running the Code

Simply use PlatformIO's "Upload" function to upload the code onto the Arduino, and it will run if your hardware configuration is correct.

You can update various pins in include/config.h, and we are using the AMT22 Encoder for motor angle measurement as well as the Pololu High-Power Stepper Motor Driver 36v4 for driving our stepper motors.

Achievements

Waterflows

The initial proportional and integral gains that came from modeling (Kp = 0.3, Ki = 0.1) resulted in non-runaway oscillations as shown.

Waterflow Graph 1

Controller tuning was performed (using smaller Kp's and Ki's) to achieve stabler convergence as shown, validating closed loop control in non-cryogenic conditions.

Waterflow Graph 2

More details can be found here.

Coldflows

Our closed loop controller showed impressive control capabilities, resulting in the settling of the controller system to pressure set points within <0.7s of controller handoff

Coldflow Fuel Manifold Pressure Graph Coldflow Ox Manifold Pressure Graph

Hotfire 11/1

Insufficient fuel tank pressure resulted in an unattainable fuel manifold pressure set point (~580 PSI). As part of FDIR procedures, due to the inability of the controller to manipulate the pressure to a redband around the set point within a set time after controller handoff, both controllers aborted into forced open loop.

Hotfire 11/1 Fuel Manifold Pressure Graph Hotfire 11/1 Ox Manifold Pressure Graph

Check in next time for the results of subsequent hotfires!

Unit Tests

PlatformIO uses the Unity testing framework for unit tests, which we use. See test/README.md.

Credits

This code was jointly developed by Daniel Zhou and Teong Seng Tan, Controls Leads of UCLA Rocket Project, Ares (2025-2026).

The graphs and slides referenced in Achievements were created by Michael Ferrell, Project Lead of UCLA Rocket Project, Ares (2025-2026).

About

Closed Loop Controller for CMFV

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •