Thread Subject: Value of the signal at a given time

Subject: Value of the signal at a given time

From: Prashant Sandhi

Date: 18 Dec, 2009 11:07:05

Message: 1 of 4

I would like to know how can I find du/dt of a signal at a given perticular time say t=1.

The block du/dt in simulink gives the answer for the complete signalwhich is not required to me. This i want to do because I need to compare du/dt at two different point on the signal and compare them

Kindly somebody give me solution for this.

Sandhi

Subject: Value of the signal at a given time

From: nanren888

Date: 29 Dec, 2009 01:15:21

Message: 2 of 4

"Prashant Sandhi" <sanddhi7@gmail.com> wrote in message <hgfnop$5d$1@fred.mathworks.com>...
> I would like to know how can I find du/dt of a signal at a given perticular time say t=1.
>
> The block du/dt in simulink gives the answer for the complete signalwhich is not required to me. This i want to do because I need to compare du/dt at two different point on the signal and compare them
>
> Kindly somebody give me solution for this.
>
> Sandhi

Depends on what you really need it for.
diff() gives a simple approximation to derivative. You can obviously provide it with only a subrange if you want.
As diff effectively takes only two samples, x(k)-x(k-1) it is not all that accurate. Equivalently you can take this as a truncated series for the derivative. &c.
Add more terms & in general you'll get more accurate.
Some have fitted curves to a few points & taken the analytic answer to the derivative of the fitted curve. This may be useful if you have a model for your signal.
Hope this helps.

If not, maybe give a few more details.

Subject: Value of the signal at a given time

From: Prashant Sandhi

Date: 7 Jan, 2010 08:36:21

Message: 3 of 4

Hallo Sir,

Can you give an example to implement on a square wave or a sine wave. Here is the link to show what I am looking for. I just want to implement a block which calculates du/dt at two different points in such a way that I can know the difference between two successive du/dt's value is zero or approximately zero.

http://i783.photobucket.com/albums/yy113/sandhi_prashant/Differentiation-1.jpg

It will be very help full for me to know this. A small example will be helpfull to understand so please send me an example if possible.

with best regards,



"nanren888 " <n.remove.this.scott@irl.cri.nz> wrote in message <hhbl79$3da$1@fred.mathworks.com>...
> "Prashant Sandhi" <sanddhi7@gmail.com> wrote in message <hgfnop$5d$1@fred.mathworks.com>...
> > I would like to know how can I find du/dt of a signal at a given perticular time say t=1.
> >
> > The block du/dt in simulink gives the answer for the complete signalwhich is not required to me. This i want to do because I need to compare du/dt at two different point on the signal and compare them
> >
> > Kindly somebody give me solution for this.
> >
> > Sandhi
>
> Depends on what you really need it for.
> diff() gives a simple approximation to derivative. You can obviously provide it with only a subrange if you want.
> As diff effectively takes only two samples, x(k)-x(k-1) it is not all that accurate. Equivalently you can take this as a truncated series for the derivative. &c.
> Add more terms & in general you'll get more accurate.
> Some have fitted curves to a few points & taken the analytic answer to the derivative of the fitted curve. This may be useful if you have a model for your signal.
> Hope this helps.
>
> If not, maybe give a few more details.

Subject: Value of the signal at a given time

From: Phil Goddard

Date: 16 Jan, 2010 00:15:21

Message: 4 of 4


If you ignore that taking the (numerical) derivative of a data series (i.e. a Simulink signal) is, for several reasons, almost always a bad thing to do, you could do the following:

Create 2 "latch" blocks to capture the value of the derivative at each of your required time points.
Each "latch" block can be constructed by using a Triggered Subsystem.

Inside the Triggered Subsystem you want to have an Input Port block feeding straight into an Output Port block.
You also want the trigger to be set to "rising edge".

Feed your signal of interest (i.e. your response signal) into a Derivative block, and the output of the Derivative block into the signal port of both triggered subsystems.
Use a Step input block to feed the trigger ports (one Step block for each Triggered Subsystem).
If your times of interest are t1 and t2 then set the step time of one Step block to be t1 and the step time of the 2nd Step block to be t2.

The outputs of the Triggered subsystems can then be compared.
Note that the value isn't really "valid" until after time t2.

Phil.

Tags for this Thread

Everyone's Tags:

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.

Tag Activity for This Thread
Tag Applied By Date/Time
dudt Phil Goddard 15 Jan, 2010 19:19:09
derivative Phil Goddard 15 Jan, 2010 19:19:09
simulink Phil Goddard 15 Jan, 2010 19:19:08
dudt of a signal Prashant Sandhi 18 Dec, 2009 06:09:09
rssFeed for this Thread

Contact us at files@mathworks.com