Error Appears while Using Simulink Design Optimization to Estimate Model Parameters for DC Motor

4 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?

Answers (2)

Joel Van Sickel
Joel Van Sickel on 13 Jun 2022
Hello Subin,
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.
Regards,
Joel

Michael
Michael on 19 Jul 2022
Hello Subin,
Did you double check to make sure the time vector you provided in Motor_Vel_time is strictly monotonic?
Sincerely,
Michael

Categories

Find more on Simulink Design Optimization in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!