0
votes

Please refer to the image at the following link attached for understanding the question.

Image is at this link: http://www5.picturepush.com/photo/a/12014483/img/12014483.jpg)

here are 2 inputs: 1.Speed_Pulse 2.PreviousSpeedPulse_1_old

The second input is nothing but the first input delayed in time by 1 time instant using the unit delay block. The 'If' block compares the 2 inputs. If the input 'u1' (Speed_Pulse) is less than 'u2'(PreviousSpeedPulse_1_old) then, in the 'if action' block, the value 64 is simply added to u1 (Speed_Pulse) value. Else, the input Speed_Pulse is directly transmitted to the output via the 'else action' block. One of the outputs is transmitted to 'Temp' (depending on the 'if-else') using the 'Merge' block.

Now, please refer to following table of inputs and outputs.

The table is at this link: http://img521.imageshack.us/img521/8684/tablewy.png

In the table, the values are wrong for instant 4 and instant 7.

I could not find a reason for this abrupt wrong output.

Any idea what is going wrong?

1
Can you observe the values in each time step using Simulink debugger? Can you show how you are adding 64? - Navan
How are you feeding in the input values? There have been issues with getting the input time vector to match up with Simulink's time. Try logging the inputs with a to Workspace block to make sure you're getting the right values. - MikeT
Hi all. Sorry it was my mistake. Actually I was using a Framework below it and it was the error of the Framework. Got it resolved. Thanks for your help. - GuiccoPiano

1 Answers

0
votes

Sorry it was my mistake. Actually I was using a Framework below it and it was the error of the Framework. Got it resolved. Thanks for your help.