-
FlexPro
- Auf einen Blick
- Features & Optionen
- Einsatzgebiete
- Alle Vorteile
- Neu in FlexPro 2021
- FlexPro gratis testen
- FlexPro View OEM Freeware
- Kaufberatung
- Login
- Language
- +49 6894 929600
- infoweisang.com
- Google Maps
- Produkte
- News
- Support
- Unternehmen
- Jobs
- Kontakt
- Login
- Language
- +49 6894 929600
- infoweisang.com
- Google Maps
calculate the true RMS value
- Dieses Thema hat 4 Antworten sowie 3 Teilnehmer und wurde zuletzt vor vor 5 Jahren, 8 Monaten von Bernhard Kantz aktualisiert.
-
AutorBeiträge
-
Februar 20, 2013 um 3:27 pm Uhr #12801MAZOYER ThomasTeilnehmer
Hello,
how can I calculate the “true” RMS value of a signal whose frequency varies ?
I try with the formula of the RMS “Mean(MySignal, MEAN_SQUARE + CALC_BLOCK, xx)”, but as the frequency varies, the CALC_BLOCK “xx” varies to !My problem is with the Block-by-block calculation, where One value is calculated per interval, which interval is not constant due to frequency.
In the example join, the interval lengh is more than 1000 points at the beginning, and around 50 points at the end so I can not calculate the RMS value by block.
Februar 20, 2013 um 3:27 pm Uhr #8459MAZOYER ThomasTeilnehmerHello,
how can I calculate the “true” RMS value of a signal whose frequency varies ?
I try with the formula of the RMS “Mean(MySignal, MEAN_SQUARE + CALC_BLOCK, xx)”, but as the frequency varies, the CALC_BLOCK “xx” varies to !My problem is with the Block-by-block calculation, where One value is calculated per interval, which interval is not constant due to frequency.
In the example join, the interval lengh is more than 1000 points at the beginning, and around 50 points at the end so I can not calculate the RMS value by block.
Februar 21, 2013 um 9:13 am Uhr #9273Bernhard KantzTeilnehmerThe RMS value is a mean value, for a good estimation it is sufficient to average over enough full periods of the signal.
To compute the RMS over single periods, one can use the FPScript function LevelCrossings() to determine the indices of upward zero crossings as boundaries in the signal to compute one RMS value per period.// indices of upward zero crossings (with 5 % hysteresis) Dim idx = LevelCrossings(IA, 0, 0.05 * Range(IA), EVENT_POSITIVE, EVENT_INDEX) // prepare output datasets in the desired length Dim rms_y = IA.Y[0L] # Shape(idx[1L,-1L]) Dim rms_x = IA.X[0L] # Shape(idx[1L,-1L]) Dim i_begin, i_end For Each Row i In idx[1L,-1L] Do // extract a full period i_begin = idx i_end = idx - 1L // use x (time) of the interval center rms_x = IA.X[(i_begin + i_end) / 2L] rms_y = Mean(IA[i_begin, i_end], MEAN_SQUARE) End Signal(rms_y, rms_x)
März 21, 2019 um 2:31 pm Uhr #21270Tho MAZTeilnehmerHello,
does not work know with version 10.0.16. I have the following error :
“Wrong data structure in index operation.
When using an index with a range specification ‘[<from>,<to>]’ both arguments must be scalar values. ”
Could you please help me ?
April 9, 2019 um 1:42 pm Uhr #21272Bernhard KantzTeilnehmerThe code seems above seems to be mangled, maybe in the transition to the new web site. The FPScript formula below should do the job.
//Recherche des index où le signal d'entrée passe à zéro (orientation positive) afin d'isoler les périodes du signal Dim PMax = Maximum(Acceleration) Dim Idx = LevelCrossings(Acceleration, 0.0, 0.05 * PMax, EVENT_POSITIVE, EVENT_INDEX) //Calcul des valeurs RMS //Code optimisé pour un calcul plus rapide //Ici on n'étend pas les variables time et rms dans la boucle for avec l'opérateur := //On définit au préalable la taille de time et rms et on les remplies dans la boucle For Dim N = NumberOfRows(idx) Dim rms = AdjustUnit(? # N-1, Acceleration) For k = 0 To N - 2 Do rms[k] = Mean(Acceleration[Idx[k], Idx[k+1]], MEAN_SQUARE) End Return Signal(rms, Acceleration.X[Idx])
-
AutorBeiträge
- Du musst angemeldet sein, um auf dieses Thema antworten zu können.