Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
In Simulink, how can I differentiate an non-smooth function

Subject: In Simulink, how can I differentiate an non-smooth function

From: Xing Li

Date: 25 Nov, 2012 19:02:09

Message: 1 of 3

Hello,
   using the continuous function integrator, I get a sinusoidal-like function after integrating an triangle wave function by twice . However, when I tried to differentiate the sinusoidal-like function by twice using the continuous function derivative block, I cannot get the original triangle wave function any more. Does anyone can suggest me a better way to differentiate the sinusoidal-like function?

Subject: In Simulink, how can I differentiate an non-smooth function

From: Phil Goddard

Date: 26 Nov, 2012 19:22:12

Message: 2 of 3


You're doing numerical differentiation, hence the (doubly integrated then doubly diff'ed) signal will be a delayed version of the original, with there also being some difference at the beginning (while the calculation initializes).
There's no way to get around that.

Are you seeing something other than that?

Phil.

Subject: In Simulink, how can I differentiate an non-smooth function

From: Xing Li

Date: 27 Nov, 2012 22:45:15

Message: 3 of 3

"Phil Goddard" <phil@goddardconsulting.ca> wrote in message <k90fh4$2ho$1@newscl01ah.mathworks.com>...
>
> You're doing numerical differentiation, hence the (doubly integrated then doubly diff'ed) signal will be a delayed version of the original, with there also being some difference at the beginning (while the calculation initializes).
> There's no way to get around that.
>
> Are you seeing something other than that?
>
> Phil.

Thanks for help. I am actually looking for a way to avoid the time delay and keep graphs in the same phase.

Tags for this Thread

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.

Contact us