Thread Subject: Help me please

Subject: Help me please

From: Prashant Sandhi

Date: 27 Jan, 2010 14:43:03

Message: 1 of 4

Help me please

        I have a signal measured at resistor Rm. From the measured signal I want to store the values at different intervals but exactly till the the difference from the present value and the previous value is '0' and this difference I want to perform by rounding the values for 3 decimals. when difference is '0' then simulation must stop here.

        How can I perform this in simulink so that the simulation keeps running till I achieve the difference as '0'?

I use MATLAB & Simulink, Simelectronics, Signal processing toolbox.

Link to see were I am measuring the voltage:

http://i783.photobucket.com/albums/yy113/sandhi_prashant/storingdifferencevalues.jpg

Any solution will be greatly appreciated.

looking for a reply :(

Subject: Help me please

From: Saurabh Mahapatra

Date: 31 Jan, 2010 05:34:21

Message: 2 of 4

Hi Prashant,

Have you considered the possibility of setting the stop time to Inf, then using a delay block to store the previous value(or a memory block) and the compare it with the new value and use that result to input a STOP block?

In this way, you can control the duration of the simulation based on the dynamics happening as the simulation proceeds.

Thanks,

Saurabh



"Prashant Sandhi" <sanddhi7@gmail.com> wrote in message <hjpjdn$1cf$1@fred.mathworks.com>...
> Help me please
>
> I have a signal measured at resistor Rm. From the measured signal I want to store the values at different intervals but exactly till the the difference from the present value and the previous value is '0' and this difference I want to perform by rounding the values for 3 decimals. when difference is '0' then simulation must stop here.
>
> How can I perform this in simulink so that the simulation keeps running till I achieve the difference as '0'?
>
> I use MATLAB & Simulink, Simelectronics, Signal processing toolbox.
>
> Link to see were I am measuring the voltage:
>
> http://i783.photobucket.com/albums/yy113/sandhi_prashant/storingdifferencevalues.jpg
>
> Any solution will be greatly appreciated.
>
> looking for a reply :(

Subject: Help me please

From: Saurabh Mahapatra

Date: 31 Jan, 2010 05:40:21

Message: 3 of 4

Hi Prashant,

Have you considered the possibility of setting the stop time to Inf, then using a delay block to store the previous value(or a memory block) and the compare it with the new value and use that result to input a STOP block?

In this way, you can control the duration of the simulation based on the dynamics happening as the simulation proceeds.

Thanks,

Saurabh



"Prashant Sandhi" <sanddhi7@gmail.com> wrote in message <hjpjdn$1cf$1@fred.mathworks.com>...
> Help me please
>
> I have a signal measured at resistor Rm. From the measured signal I want to store the values at different intervals but exactly till the the difference from the present value and the previous value is '0' and this difference I want to perform by rounding the values for 3 decimals. when difference is '0' then simulation must stop here.
>
> How can I perform this in simulink so that the simulation keeps running till I achieve the difference as '0'?
>
> I use MATLAB & Simulink, Simelectronics, Signal processing toolbox.
>
> Link to see were I am measuring the voltage:
>
> http://i783.photobucket.com/albums/yy113/sandhi_prashant/storingdifferencevalues.jpg
>
> Any solution will be greatly appreciated.
>
> looking for a reply :(

Subject: Help me please

From: Prashant Sandhi

Date: 1 Feb, 2010 07:52:05

Message: 4 of 4

Dera Saurabh,,

                I will try to implement what you have suggested and let you know if it works. Thank you for this good idea.

Prashant

"Saurabh Mahapatra" <saurabh.mahapatra@mathworks.com> wrote in message <hk3545$g3t$1@fred.mathworks.com>...
> Hi Prashant,
>
> Have you considered the possibility of setting the stop time to Inf, then using a delay block to store the previous value(or a memory block) and the compare it with the new value and use that result to input a STOP block?
>
> In this way, you can control the duration of the simulation based on the dynamics happening as the simulation proceeds.
>
> Thanks,
>
> Saurabh
>
>
>
> "Prashant Sandhi" <sanddhi7@gmail.com> wrote in message <hjpjdn$1cf$1@fred.mathworks.com>...
> > Help me please
> >
> > I have a signal measured at resistor Rm. From the measured signal I want to store the values at different intervals but exactly till the the difference from the present value and the previous value is '0' and this difference I want to perform by rounding the values for 3 decimals. when difference is '0' then simulation must stop here.
> >
> > How can I perform this in simulink so that the simulation keeps running till I achieve the difference as '0'?
> >
> > I use MATLAB & Simulink, Simelectronics, Signal processing toolbox.
> >
> > Link to see were I am measuring the voltage:
> >
> > http://i783.photobucket.com/albums/yy113/sandhi_prashant/storingdifferencevalues.jpg
> >
> > Any solution will be greatly appreciated.
> >
> > looking for a reply :(

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com