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

3 次查看(过去 30 天)
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?

回答(2 个)

Joel Van Sickel
Joel Van Sickel 2022-6-13
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 2022-7-19
Hello Subin,
Did you double check to make sure the time vector you provided in Motor_Vel_time is strictly monotonic?
Sincerely,
Michael

类别

Help CenterFile Exchange 中查找有关 Parameter Estimation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by