How can I import my graph as a signal to Simulink?

18 次查看(过去 30 天)
Hello everyone.
I am trying to build/run a Kalman Filter on Simulink. I have test data that I can use as input to the state space model and I have measurements of the output.
In a .mat file I have the signals as "structures". So in matlab I managed to plot them as a 2D graph.
However, I need to implement them to my Kalman filter on Simulink as signals (I suppose?). I tried the signal builder but I failed from my several attempts.
I also tried to copy my data on the x and y axes to an excel file, then importing it to a signal builder block on Simulink, couldn't manage that either.
I use R2018a version.
Thank you in advance for your answers.

回答(1 个)

Paresh yeole
Paresh yeole 2020-7-14
Lookup table is what you need. Below is a link for a video on lookup tables:
  2 个评论
Nazli Firuze Onder
Nazli Firuze Onder 2020-7-15
Thank you for your answer; but I couldn't do it. I didn't understand why I need an input for Lookup Table.
I have measurement of angle with respect to time.
And I have 28880 data rows to plot this. I insert them in the Lookup Table Block:
However for my filter gives error. I don't know how I should build the correct system:
It gives me an error saying that it needs only 1 data point, and accepts the rest 28799 data points as error. I need to import a graph, not a single value. (I know that y also needs input, I need to build lookup table for that too.)
I think i need to introduce a block as input(repeating sequence stair maybe?) to the lookup table, but I don't know how. Any ideas?
Paresh yeole
Paresh yeole 2020-7-15
Use clock as an input for the lookup table. [make sure the no. of data points and your simulation points (sample time * simulation end time) are equal : use fixed step size]

请先登录,再进行评论。

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by