How can I differentiate a function in Simulink with respect to a variable included in the function itself?
5 views (last 30 days)
Show older comments
I am studying the dynamic state operation of an electrolysis process and I have the following function:
E_anode = 1.391 - 1.4481e-3 * T_electrode.
However, T_electrode is changing with the time, therefore I want to study the change of E_anode with respect to the change of T_electrode, so I want to calculate dE_anode/ dT_electrode. Which mathematical block would be appropriate for this differentiation?
0 Comments
Answers (1)
Raghava S N
on 22 May 2024
Hello Mohamed,
The first derivative of the function included in the post must be calculated, which is a linear equation. In the equation, the variable “E_anode” is dependent on the variable “T_electrode” and“T_electrode” is in turn dependent on time. Therefore, both the variables “T_electrode” and “E_anode” are dependent on time.
Hence, the direct derivative of the given equation with respect to “T_electrode” can be found. Given the function, E_anode = 1.391 - 1.4481e-3 * T_electrode, the direct derivative of “E_anode” with respect to “T_electrode” is:
dE_anode / dT_electrode = -1.4481e-3.
This derivative does not depend on the value of “T_electrode”. In Simulink, if you are looking to model this behaviour, as “T_electrode” changes over time, you might not necessarily need a differentiation block. Since the derivative dE_anode / dT_electrode is a constant, it can be directly modelled as a Simulink Constant block with the value -1.4481e-3. Here is the link to the MATLAB R2024 a documentation page of the Simulink Constant block for your reference - https://www.mathworks.com/help/simulink/slref/constant.html
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!