How to insert a curve stemming from a measure in Simulink to use the parameter estimation?

4 ビュー (過去 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.
;)
  1 件のコメント
Franck Donnadieu
Franck Donnadieu 2017 年 12 月 29 日
I have joined a PDF file in the first message to explain my problem in picture. ;)

サインインしてコメントする。

採用された回答

Anh Tran
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);
There is a much easier way with Serilizer1D block if you have HDL Coder license.
Hope this helps.
Best,
Anh
  1 件のコメント
Franck Donnadieu
Franck Donnadieu 2018 年 1 月 7 日
Hi Anh and thank you for your help. I did not obtain result with MATLAB Function Block but seriliser1D Block helped a lot me, I have just a problem with the scale of my curve. If you have time I would come back to you to explain yourselves my problem if I do not manage to find how to parametrize my blocks. Thank you again.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeVariable Initialization についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by