0
votes

I want to use the following signal (red) in Simulink as input.

enter image description here

All I have is this picture. Any advice on the simplest way to implement this signal?

1
You could use the signal builder block.Praetorian
Feed a square wave (created using the Signal Generator block) into a first order lag (using the Transfer Function block), and play around with the lag's time constant until its output matches the response of the desired signal.Phil Goddard
If the "picture" is in a MATLAB figure file format (*.fig) you can retrieve the data from the figure and use the From Workspace block.am304

1 Answers

0
votes

Your question has two parts: bringing the data to work space of Matlab and feeding the data to Simulink.
For the first part I think the simplest thing is to put about 30 points on the figure and write their estimated (x,y) values in vectors X and Y. it should not be hard because the first part of it is periodic.
Then use plot(X,Y) to plot this vector in Matlab and update your estimated values till you are satisfied that your plot is similar to the figure.

For the second part you can create a structure where time is the same as your X axis and Y as the values:
input.time = X;
input.signals.values = Y;
where X and Y should have the same length.
you can find good examples of how to import signals from work space to Simulink at this page: https://www.mathworks.com/help/simulink/slref/fromworkspace.html