How to insert a curve stemming from a measure in Simulink to use the parameter estimation?
5 次查看(过去 30 天)
显示 更早的评论
Hello to all, I explain you briefly the problem with which I am confronted.I would like using the "Parameter estimation". This tool allows to determine the parameters adequate of a component (in my case, the internal resistance, the constant of torque and the inertia of my rotor).
The goal is that the answer in simulation is the closest possible of the experimental statement
I have made a measure of the current absorbed by means of an oscilloscope I have marked some points with Excel log which I saved in *.mat file.
The problem it is because when I run the simulation, I have well my curve of simulated current (in red) but my experimental curve is in the form of "lines"??
What is infuriating it is that I manage to show this experimental curve with the PLOT command… If somebody had the solution to my problem I would be very grateful to him(her) for it.
Good evening.
PS: Sorry but i can't post no more pictures, "You are limited to 10 daily uploads. If you need to upload additional files, delete one or more files now or wait 24 hours to upload more files."
I Will try again tomorow.
;)
采纳的回答
Anh Tran
2018-1-3
Hi Frank,
It seems that you are trying to input a vector into Simulink scope block. Simulink will treat each element of your vector as a signal and display as individual constant lines. For example, if you input a 10-by-1 vector, you will see 10 lines in your Scope.
There are many ways to serialize your vector. For a simple workaround, you may want to pass 1 element of your vector at each time step to your scope. You can do this with a MATLAB function block and a Clock block. You can check my set up below. Note that my input is a 1-by-10 vector and my configuration is for fixed step solver with 1 second. At each second, I pass 1 element from the vector to the below scope. The scope above, on the other hand, should show 10 lines. If you have different time step setting, you may want to tweak the MATLAB function block.
function y = fcn(u,t)
y = u(t+1);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/180610/image.png)
Hope this helps.
Best,
Anh
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Sources 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!