I have a mathematical model of two dynamic systems which I need to implement in PLC, but I don't know how to implement differential equations in structured text language. Any suggestions on that will be helpful.
I have been thinking of converting differential equations to difference equation, but I don't have any idea how to do this.
$$\ddot{\Theta}=\dfrac{1-K_d\cdot\dot{\Theta}}{J} \tag {1} $$
$$\dot{i} = \dfrac{1}{L}(V-K_g k_f \dot{\Theta}-R i) \tag {2}$$
theta_dot_dot = 1/J*(1 - Kd*(theta_dot)) -------> Equation 1
i_dot = 1/L*(V - (Kg)(kf)(theta_dot) - R*i) --------> Equation 2