Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to derive Equation 6 in this paper? #10

Open
Zheng222 opened this issue Jun 20, 2024 · 1 comment
Open

How to derive Equation 6 in this paper? #10

Zheng222 opened this issue Jun 20, 2024 · 1 comment

Comments

@Zheng222
Copy link

@HanshuYAN Thanks for your open-source code.

  1. Could you tell me how to derive Equation 6 in this paper?

  2. In the following code snippet, why is lambda_t and eta_t equal to the right equation?
    lambda_t = ( lambda_s * (t_e - t_s) ) / ( lambda_s *(t_c - t_s) + (t_e - t_c) )
    eta_t = ( eta_s * (t_e - t_c) ) / ( lambda_s *(t_c - t_s) + (t_e - t_c) )

@shyoshyo
Copy link

shyoshyo commented Aug 27, 2024

the following three assumptions in paper are sufficient to derive all formula you have mentioned:

  • image
  • image
  • image

solve these three equations for $v, z_{t_{k-1}}, z_{t_{k}}$(in other words, express $v, z_{t_{k-1}}, z_{t_{k}}$ in terms of other variables):

import sympy
t, t_k1, t_k, z_t, z_t_k, z_t_k1, eps, lambda_k, eta_k,v = sympy.symbols('t t_{k-1} t_k z_t z_t_k z_t_{k-1} eps lambda_k eta_k v')

eq_1 = (z_t_k1 - z_t_k) / (t_k1 - t_k) - v
eq_2 = (z_t_k1 - lambda_k * z_t_k) / eta_k - eps
eq_3 = (t - t_k1) / (t_k - t_k1) * z_t_k + (t_k - t) / (t_k - t_k1) * z_t_k1 - z_t

print(sympy.solve([eq_1, eq_2, eq_3], [v, z_t_k, z_t_k1]))

# prints: {
#     v: (eps*eta_k + lambda_k*z_t - z_t)/(lambda_k*t - lambda_k*t_k - t + t_{k-1}),
#     z_t_k: (-eps*eta_k*t + eps*eta_k*t_k - t_k*z_t + t_{k-1}*z_t)/(lambda_k*t - lambda_k*t_k - t + t_{k-1}),
#     z_t_{k-1}: (-eps*eta_k*t + eps*eta_k*t_{k-1} - lambda_k*t_k*z_t + lambda_k*t_{k-1}*z_t)/(lambda_k*t - lambda_k*t_k - t + t_{k-1})
# }

where:

  • result of $v$ corresponds to Eq (6) in paper
  • the coefficients of $z_t$ & $\epsilon$ in the result of $z_{t_{k-1}}$ correspond to lambda_t, eta_t in the code snippet, where t_c refers to $t$t_e refers to $t_{k-1}$, t_s refers to $t_k$, eta_s refers to $\eta_k$, and so on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants