Team Status Report for Feb 24

Significant risks and risk management:

Risk: The analog circuit can’t meet the required tolerances

Definition: This risk has been brought to our attention by our assigned in instructor Thomas Sullivan (Thanks!). It is currently unclear to us what tolerance the analog components will need to have in order to satisfy the 10% solution accuracy required by the accuracy requirement (NR3). This is nontrivial to determine as the accuracy of the whole circuit can’t be easily associated with the accuracy of individual components.

Severity: If the analog circuit can’t meet the required tolerances, the progress of the whole project would be severely jeopardized, because the accuracy requirement (NR3) would not be satisfied.

Resolution: A solution is to use Sergey’s work [1] as a reference. If our components are more accurate than Sergey’s components in every relevant measure, it is likely that the whole circuit wouldn’t be significantly worse in accuracy compared to his circuit. This is possible because  more accurate components are available since his work was published.

Current progress:

We have completed P2, and is currently working towards P1 and P3. We performed some benchmarking on P2, with results showing that the majority of the time spent in the solver is on the QP subproblem(32ms out of 38ms). This means that if we solve the QP subproblem with our analog solver we can potentially get large speed up.

Changes to the existing design:

There are no changes to the existing design. We have completed P2 successfully, indicating that we can proceed with our existing design.

Changes to the project schedule:

Similarly, there are no significant changes to the project schedule.

Alvin Zou’s Status Report For 2/24

Personal tasks of this week:

Task: Profiling double pendulum swing up with NMPC

Definition: Analyzing results from the double pendulum swing up and performing performance profiling.

Completion: I have conducted some profiling on the performance of the NMPC controller, with results showing that most of the time spent in the pipeline is on solving the QP subproblem. This confirms the hypothesis that we can theoretically achieve a lot of speed up if the QP subproblem is solved using our analog solver.

 

Task: Design review presentation

Definition: Presenting the design review presentation

Completion: The presentation is completed.

 

Task: Formulating NMPC problem and isolating the QP subproblem

Definition: Formulating the NMPC problem for our system mathematically and converting it to a form that can be solved by SQP. After this is achieved, the QP subproblem can then be isolated. This step is to calculate what variables are used in the QP subproblem, so that the analog circuit can be designed to solve the correct subproblem.

Completion: The state update equations have been formulated. Next is converting the equations into a form that can be solved by SQP and then isolating the QP subproblem.

 

Next Steps:

The next step is to continue deriving the mathematical representation of the NMPC problem to eventually isolate the QP subroutine in preparation for replacing it with our analog solver.

Overall progress assessment:

Currently on schedule. Working towards isolation of the digital and analog solver.

Alvin Zou’s Status Report For 2/17

Personal tasks of this week:

Task: Double pendulum swing up with NMPC

Definition: Building Prototype 2 by creating a double pendulum system, designing a controller to control the system, and visualizing the simulation.

Completion: Currently, I have created the system and designed a controller with Thomas using do-mpc that can successfully swing up the pendulum.

Task: Slides for design review presentation

Definition: Creating the slides for the design review next week with the rest of the team. Also rehearsing for the presentation.

Completion: The presentation is mostly completed. Aim to complete by Sunday.

 

Next Steps:

The completion of P2 has validated the problem can be solved using a software SQP solver. The next step is then to isolate the QP subroutine in preparation for replacing it with our analog solver. Basic profiling should also done on P2 to collect performance data.

Overall progress assessment:

Currently on schedule. P2 is completed.

Alvin Zou’s Status Report for 2/10

Things I did:

For the past two weeks, I helped our team create the abstract and presentation. Additionally, I worked on the symbolic modeling and simulation of the double pendulum system with Thomas, towards prototype 2. Specifically, I was able to use the Lagrangian equations of the system to derive the equations of motion, and encoded them into symbolic objects in Casadi. The main challenge I faced during this step is figuring out how to represent dynamical systems in Casadi. This is largely due to the fact that Casadi’s documentation is very sparse. This caused issues when I tried to represent the derivatives of variables, as I had to work around to find a correct representation.

Additionally, after obtaining the dynamical equations, I was able to implement a Second Order Implicit Runge-Kutta solver(IRK2). By using this solver, I can solve the dynamical ODE’s, giving me the evolution of the state with respect to time. The reason we used IRK2 is three fold:

  1. IRK2 guarentees stability if the ODE system is stable.
  2. It gives O(dt^3) local error(where dt is the time step) even though it’s a second order method due to some its properties.
  3. It only requires the current state and next state values when solving the system, which is already given by the NMPC formulation. This means there is no need to add additional variables to the equality constraint for optimization, which means we don’t need to add additional components to the PCB board.

After creating the solver, I implemented a basic visualizer using matplotlib, which visualizes the double pendulum and displays how it’s state evolves as time progresses.

Finally, I added a control input, a torque on the joint, to the system.

The resulting simulation with a constant torque applied is shown below.

 

Things I will do:

For the upcoming week, I will continue working on the simulation, starting with looking into how to integrate a NMPC solver into the system. This will involve a review of existing solvers, and looking at ways of integrating them with Casadi.

 

Current standing:

Currently, I am on schedule working towards prototype 1. I will be continually working on this for the next week.