Regarding Dynamic simulation

16 views
Skip to first unread message

Dr. Jalesh Purohit

unread,
Sep 14, 2024, 2:19:34 AM9/14/24
to apmo...@googlegroups.com
Hi,
I am using my Matlab code for state estimation using Extended Kalman Filter.  For the state prediction step in the Kalman filter, I am using APMonitor and a model.apm file containing the system's equations for dynamic simulation. Predicted state values are retrieved from APMonitor server. Predicted states are then corrected using Kalman gain. My question is HOW CAN I SUPPLY THE CORRECTED STATE AS NEW INITIAL CONDITION in the next sampling interval during dynamic simulation so that it can be used by model.apm file? IN the beginning of every sampling instant, the initial condition of state variables are to be communicated to model.apm file. How can I do this? Please advise.

Thanks in advance

Dr. Jalesh L. Purohit (PhD, IIT-Bombay),
Professor, Chemical Engineering Department,
D D University, Nadiad
Mob: 91 9925665899

DISCLAIMER: The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material which is the intellectual property of Dharmsinh Desai University (D.D.U., Nadiad). Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is strictly prohibited. If you are not the intended recipient, or the employee, or agent responsible for delivering the message to the intended recipient and/or if you have received this in error, please contact the sender and delete the material from the computer or device. Dharmsinh Desai University does not take any liability or responsibility for any malicious codes/software and/or viruses/Trojan horses that may have been picked up during the transmission of this message. By opening and solely relying on the contents or part thereof this message, and taking action thereof, the recipient relieves the Dharmsinh Desai University of all the liabilities including any damages done to the recipient's pc/laptop/peripherals and other communication devices due to any reason.

John Hedengren

unread,
Sep 19, 2024, 1:36:34 PM9/19/24
to apmo...@googlegroups.com

I communicated with Jalesh through LinkedIn and he confirmed that the following fix worked. I just wanted to share this message with the rest of the group in case someone else needs help with updating State initial conditions with the MATLAB interface.

 

 

Set the states to the SV type. Set FSTATUS=1 for the state variables you want to update and then update the measured values for those states with MEAS = 3.2.

Another way to do this is to manipulate the files in the run directory to update the states directly, but this is more difficult. This is a better way if you have a large-dimensional state vector.

 

 

Best regards,

 

John Hedengren

--
--
APMonitor user's group e-mail list.
- To post a message, send email to apmo...@googlegroups.com
- To unsubscribe, send email to apmonitor+...@googlegroups.com
- Visit this group at http://groups.google.com/group/apmonitor
---
You received this message because you are subscribed to the Google Groups "apmonitor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to apmonitor+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/apmonitor/CANYvMruBSMuG4G2_5ewq_T%2BkTUNLaF%2Bjf9YiyY4FtnJzLmegHw%40mail.gmail.com.

Reply all
Reply to author
Forward
0 new messages