Error Appears while Using Simulink Design Optimization to Estimate Model Parameters for DC Motor
8 views (last 30 days)
I followed this video(Estimating DC Motor Parameters) with these code(Aileron Model in Simscape - File Exchange - MATLAB Central (mathworks.com) , Motor_Param_Est.slx) to estimate my DC motor parameters.
I modified Motor_Vel_Signal and Motor_Vel_time with my data and ran the simulation. In Parameter Estimator, when I press Plot Model Response, error appears below.
So, When I changed solver(variable step to fixed step) by referring to this (Invalid Output times specified in the Configuration Parameters dialog for block diagram 'untitled1' - (mathworks.com)), the simulation result became strange.
variable step solver fixed step solver
The magenta graph is my data.
I used version r2021a update 6.
What should I do to solve this problem?
Joel Van Sickel on 13 Jun 2022
the most likely issue is that the fixed step time is too large to simulate accurately. Variable step solvers automatically make the step size smaller if necessary to try and ensure an accurate simulation. If changing from variable step to fixed step makes your results worse, the most likely culprit is that you need to use a smaller fixed time step for your simulation. Some other issues. If you changed your Simulink solver to fixed step, most of those solvers don't actually work well with simscape solvers. You can go to the simscape solver configuration block and set that to local solver, backward euler, and then the simscape network will also run fixed step.