Skip to main content
. 2022 Aug 26;22(17):6438. doi: 10.3390/s22176438
Algorithm 8: Functional Flow of Extended Kalman Filter
  • 1. 

    Build A matrix

  • 2. 

    Compute the state time update, (x)

  • 3. 

    Compute the error covariance update, (σ)

  • 4. 
    Loop (for 1 to 2)
    • a. 
      Compute the SOC update
    • b. 
      Build C and D matrix
    • c. 
      Calculate term sφeandΔηfrom Non-linear corrections
    • d. 
      Calculate the predicted output voltage,(yvolt,k)
    • e. 
      If Loop = 2, break
    • f. 
      BuildC^andD^
    • g. 
      Compute the Kalman Gain matrix (L)
    • h. 
      Compute the state measurement update, (x)
    • i. 
      Compute the error covariance measurement update, (σ)
  • 5. 

    End Loop

  • 6. 
    Create terms needed for MPC formation and constraints
    • a. 
      Calculate the updated Non-linear φs-e
    • b. 
      Compute the derivative of OCV at current state/soc
    • c. 
      Create the C and D matrices for MPC SOC and φs-e output equations
  • 7. 

    End EKF