Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Derivation and Integration in MATLAB/SIMULINK

Status
Not open for further replies.

powersys

Advanced Member level 1
Joined
Nov 29, 2005
Messages
439
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,298
Activity points
4,981
derive matlab

I try to implement derivator and integrator in MATLAB/SIMULINK as shown in Figure below. The input to the derivator or integrator is a sinewave. I found out an offset at the output of the integrator. How to remove the offset? The model uses default settings.

57_1186888199.jpg
 

matlab derive

Hello powersys,

what you see is due to the fact that mathematically the result of the integration is the calculation of the area (with sign) enclosed by the input curve: in your example the sin input starts with zero phase so the integral initially accumulates positive area for a half period then it decreases to 0 by subtracting the negative area enclosed by the sin wave in the following half period and so on.
If you start the sin with Π/2 offset you should obtain a balanced output from the integrator.

Regards
Mowgli
 

    powersys

    Points: 2
    Helpful Answer Positive Rating
derivation in matlab

mowgli said:
what you see is due to the fact that mathematically the result of the integration is the calculation of the area (with sign) enclosed by the input curve: in your example the sin input starts with zero phase so the integral initially accumulates positive area for a half period then it decreases to 0 by subtracting the negative area enclosed by the sin wave in the following half period and so on.
If you start the sin with Π/2 offset you should obtain a balanced output from the integrator.
Thanks for your reply. Please help me to solve my problem in this post
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top