0
votes

I tried my whole Simulink model with the configuration which are mentioned in the answer of my previous question by am304.But, an error concerning the fixed step size appears to me. Unfortunately, I couldn’t understand what it means:

The computed fixed step size (2.195764022074938e-011) is 1000000 times smaller than all the discrete sample times in the model 'test'. This fixed step size has been computed based on the following specified discrete sample times:

[2.247191011235955e-005 0]
[4.49438202247191e-005 0]
[0.1 0]
[1 0]

and the following propagated discrete sample times:

[2.195764022074938e-011 0]
[4.391528044149876e-011 0]
[4.885574949116737e-008 0]
[5.374132444028412e-007 0]
[9.380303902304136e-006 0]

in the model. You can fix this error either by switching to a variable step solver or by specifying a fixed step size such that the discrete sample times (both periods and offsets) are integer multiples of the fixed step size.

I have changed the solver to variable-step: it works but, I got the same problem at the first one related to another buffer (the last one (there are other buffer in the middle of the model)):

Error reported by S-Function 'sdsprebuff2' in 'test/ALAMOUTI Receiver/Buffer1': All sample times for this block must be discrete. No continuous or constant sample times are allowed.

So could you please help me to resolve this problem? Thanks in advance

1

1 Answers

3
votes

I am supposing you have some fs somewhere in your code, that you are sampling something. What Simulink tells you is: if you use fixed step size, please, use a integer multiple of that fs.

This makes sense, as if your fs is 1Hz, and you do a simulation step every 0.6s, then time=1s (and others) will not be sampled, as your simulation step will be [0 0.6 1.2 1.8 ...].

So, you can either let Simulink choose the simulation steps by itself (variable step) or you can define a fixed step, but it has to be proportional to fs. For example: if fs=1 , then fixed step can be: 1, 0.5, 0.333333,0.25, 0.2, ...