Simulink Design Optimization 1.1
Muscle Reflex Parameter Estimation
Contents
Simulink® Model of the Muscle Reflex
The Simulink® model for the system is shown below.
Muscle Reflex Model Description
For this demo a simple knee reflex action of humans is modeled. When the patellar tendon is excited, for example when a doctor strikes it with the nub of a small rubber hammer, the tendon reacts with a small but quick reflex force. This in turn pulls the muscle and we observe that the leg jerks forward slightly at the knee.
For this model we treat the tendon itself as a small torsional spring damper with inertia (J), stiffness (K) and damping (B). When the tendon is excited a signal is sent through the nervous system to the spinal cord reporting a structural change (i.e. tendon length). The nervous system then sends a signal back to the tendon to produce a reflex. There are receptors on the muscle called spindles that have their own dynamics and shown in the model as a transfer function in the feedback path. The spindles are modeled as a spring (Kpe) and damper (Bpe) in parallel, and then with the pair in series with another spring (Kse). The differential equation describing these dynamics is given by
![$$T^\prime = (Kse/b)*[Bpe*x^\prime + Kpe*x)] - [(Kse + Kpe)/b]*T$$](/products/demos/shipping/sldo/spe_muscle_eq21741.png)
For this model we supply two brief pulses, one stronger than the other, as input. This is similar to what one might experience in a doctor's office.
Estimation Data
There is a project already associated with this model. You can access it by double-clicking the orange block in the lower left corner of the model. You can view the data set added by clicking on the "Transient Data" node and selecting "Reflex Response". There is only one data set used for this demo.
These data sets can be imported from various sources including MATLAB® variables, MAT files, Excel® files, or comma-separated-value files.
Define Variables
The Estimation variables are selected by clicking on the "Variables" node and pressing the "Add" button. We have already loaded the parameters for this model. These parameters are the inertia, J; the damping coefficient, B; the return spring constant, K; the neural transmission delay, Td as well as the spindle dynamics parameters beta, alpha and tau.
Since we know from our physical insight that none of these parameters can be negative we set their lower limits to zero.
The Estimation Task
In order to run an estimation, we first need to create an "Estimation" node. This is done by clicking on the "Estimation" node and pressing the "New" button in the right-hand-side panel.
In our project, we have already created an estimation node called "New Estimation". We can click on this node to set up its various options.
The first panel is where we select the data sets to be used in this estimation. It is possible to use one or more data sets at once in a given estimation. For this model, we will use the data set called "Reflex Response".
The next panel called "Parameters" is where we select which parameters to adjust in this estimation. Even though we have already added our parameters, in general, it is not necessary to estimate all of them at once. However, since our model is simple enough we will estimate all of our parameters.
We can also select various optimization options by clicking the "Estimation Options" button in the Estimation tab. If you do this you will get the panel shown below
For this model we will use the Nonlinear Least Squares optimization method.
Before we proceed with our estimation we would like to monitor the results of the estimation process. We will create a number of dynamics plots, called "Views". To add a plot to view we select the "Views" node and select "New". This will create a "New Views" node. If we select this node then we can choose to which plots we would like. There are five to choose from, Cost Function, Measured vs. Simulated, Parameter Sensitivity, Parameter Trajectory and Residuals. For this demo we will look at Measured vs. Simulated to compare our results as well as Residuals to view the absolute error of the results.
Running the Estimation and Viewing the Results
To run the estimation press the "Start" button in the Estimation tab of the "New Estimation" node. The estimation will begin and keep iterating the parameters values until optimal values of the parameters are found. The plot below shows the experimental data overlaid with the simulated data. The simulated data comes from the model with the estimated parameters. The results of the estimation appear satisfactory, the estimated (blue) curve closely matches the measured results.
We can also view residuals of the estimation. Residuals are the error between the measured response and simulated response at each time step. The plot below the residuals are essentially the noise from the experimental data so we are again satisfied that parameters in the model were estimated well.
Conclusion
The parameters of the model have been tuned to match the experimental results very well and our estimation error is only the original noise in the results. We can conclude that the parameters in the model have been successfully estimated.
Store