# Why does integrating my signal attenuate it?

1 vue (au cours des 30 derniers jours)
Janith Wijekoon le 18 Avr 2022
Commenté : Janith Wijekoon le 18 Avr 2022
I fed a sine wave through an continuous time integral block as follows and noticed that the amplitude of the integrated output is much lower than the input signal, and it's also shifted up in the Y-axis. Why is this, and how should I account for it every time I include an integral in a model?  I'd also appreciate it if someone could tell me why the first few periods of the wave plotted by the scope here is much less smoother compared to the ones it plots later. Thanks!
##### 0 commentairesAfficher -2 commentaires plus anciensMasquer -2 commentaires plus anciens

Connectez-vous pour commenter.

### Réponse acceptée

Paul le 18 Avr 2022
Hi Janith,
If the input to the integrator block is u(t) = sin(w*t), the output of the integrator will be y(t) = -1/w*cos(w*t) + C. The constant, C, will be determined by the Initial Condition of the integrator block, which in this case is 0 based on the yellow curve. So
y(0) = 0 = -1/w*cos(w*0) + C = -1/w + C. So we have C = 1/w. Using that value of C the output y(t) is
y(t) = -1/w*cos(w*t) + 1/w = 1/w*(1 - cos(w*t))
The smoothness issue is probably related to the solver settings, assuming the model is using a variable step solver.
##### 1 commentaireAfficher -1 commentaires plus anciensMasquer -1 commentaires plus anciens
Janith Wijekoon le 18 Avr 2022
Thanks!

Connectez-vous pour commenter.

### Catégories

En savoir plus sur General Applications dans Help Center et File Exchange

R2021a

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!