Azzera filtri
Azzera filtri

I have plotted a signal in Simulink and now i want to write a code to integrate that signal over the limits? can anyone help me with this please

2 visualizzazioni (ultimi 30 giorni)
clc;
clear all;
open('tranmissionfault.slx');
sim('tranmissionfault.slx');
syms t
P=int(Phasecurrent,t,0,0.008)

Risposta accettata

madhan ravi
madhan ravi il 6 Gen 2024
Modificato: madhan ravi il 6 Gen 2024
Use Integrated Limited block specifying the upper limit as 0.008 and lower as 0.
edit: Thanks @Paul, i overlooked it, yes the same goal can be achieved in Simulink using a switch block, but not going in detail into it, since the OP's intention is to use MATLAB code
  17 Commenti
A Lumbini
A Lumbini il 7 Gen 2024
Sir, i got 0.15 approximately when i integrate the sine wave
But,then i tried the same after the fault and i am getting huge value
F=0.05
ix = (Phasecurrent.Time >= F) & (Phasecurrent.Time <=F+0.020047);
Int = cumtrapz(Phasecurrent.Data(ix))
vpa(Int(end))
ans =
137031976.93982961773872375488281

Accedi per commentare.

Più risposte (0)

Community

Più risposte nel  Power Electronics Control

Categorie

Scopri di più su Event Functions in Help Center e File Exchange

Prodotti


Release

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by