Variable sampling frequency in OpenModelica
问题 I am referring to this post: alternative to sample function with varying sampling range I want to measure an RMS value (or a mean value) with a variable sampling frequency, which i can feed in as an input signal. The suggested way which nearly suits my need is the following: model RMS constant Real f_max = 2*2*asin(1.0); constant Real f = 1+abs(2*asin(time)); Real signal = sin(time); Real rms = if time < f then (if time < 1e-10 then signal else sqrt(i_sq / time)) else sqrt(i_sq_f / f); Real i