Simulink: Understanding Time Steps and Sampling Frequencies

Click For Summary
The discussion focuses on understanding time steps and sampling frequencies in Simulink. The time step between iterations is determined by settings in the menu bar, including the numeric solver choice. Users need to ensure that input arrays are spaced according to the specified step size for proper functionality. To read an array element by element during iterations, the "from workspace" block can be utilized. This method allows the system to process each value sequentially from the input array.
swraman
Messages
165
Reaction score
0
Hi,

I have a project due that has to be done in Simulink.

I am somewhat familiar with Simulink, but some things don't make sense to me.

First off, What determines the time step between each iteration? eg. when you have a clock in the model, what determines the change in time from one iteration to the next?

I remember working with a model once, and changing something in the model changed the sampling frequency for some reason, shich makes no sense to me.

Thanks

Raman
 
Engineering news on Phys.org
You can change the step size in the settings of the menu bar along with what kind of numeric solver it uses. i.e. ode45,ode23, etc.
 
So if I have a input array which is to be used in the system, then I have to make sure the values in the input array are spaced the same time apart as the step size I specify in Simulink Options?
 
How do I add an imput variable that is not a constant?

I have an array of values that I want the system to use, but I don't know how to get it to read the array one element at a time (each iteration I want it to take in one value from the array, and as it goes on it will read down the array).

Thanks
 
Last edited:
swraman said:
So if I have a input array which is to be used in the system, then I have to make sure the values in the input array are spaced the same time apart as the step size I specify in Simulink Options?

I'm not sure, I would google that or look on the mathworks website. It may well be that simulink just interpolates points if it needs to.
 
swraman said:
How do I add an imput variable that is not a constant?

I have an array of values that I want the system to use, but I don't know how to get it to read the array one element at a time (each iteration I want it to take in one value from the array, and as it goes on it will read down the array).

Thanks

Again, a question for the mathworks forums.
 
thanks i was able to solve itl its just the "from workspace" block.
 

Similar threads

  • · Replies 0 ·
Replies
0
Views
2K
Replies
17
Views
5K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 12 ·
Replies
12
Views
2K
Replies
1
Views
3K
  • · Replies 22 ·
Replies
22
Views
4K
  • · Replies 43 ·
2
Replies
43
Views
5K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
1
Views
1K