+1 vote

the RMS function of a pure sine wave must be like a strait line >>> and when you get the di/dt for the RMS it must be = zero ...

but when i am useing the RMS block funtion the program ask about (sampling time , Number of sample) and i dont know what is the reight parameter must be set to get the right output ... So any one please help me and explain if i have something wrong .

but when i am useing the RMS block funtion the program ask about (sampling time , Number of sample) and i dont know what is the reight parameter must be set to get the right output ... So any one please help me and explain if i have something wrong .

+3 votes

The RMS value of a periodic signal is the DC (straight line) value which would transfer the same power **per period**. The Nyquist-Shannon sampling theorem states that in order to properly resolve a sampled signal, the sampling rate must be at least twice the frequency of the highest frequency component you want to measure.

For a pure sine wave at 10 kHz, for example, you would need to sample at 20 kHz or greater in order to properly distinguish the waveform from a similar waveform of lower frequency (see this figure). Since the period is the reciprocal of the frequency, you should select a sampling time and number of samples such that their product is less than or equal to 1/(2*f), where f is the frequency of your generated sine wave; in other words:

2f <= 1/(Ns*Ts)

A description of the block, including these parameters, is available in the PLECS manual, page 354, and can also be seen by right-clicking on the RMS block and selecting "Help".

...