DC or average value of a non-sinusoidal signal
A lowpass filter can find it, for ex. a RC filter. But the result takes at least 5RC to get stabilized to 1% and it still has AC component, too because the filter doesn't fully attenuate the non-zero frequency components. A good idea to search a compromise between the unwanted AC component and the build-up time of the average is to simulate.
Another approach is an integrator+ a control circuit which resets the integrator, lets it get charged a certain time period (=integrator's time constant), changes the integrator to hold state (=removes the charging current) and outputs a signalling pulse &quot;the average is now available at the output&quot;.
The described device can be considered as a measuring machine which should be triggered to make one measurement. If you have periodic signal to be measured you should extract the triggering and integration period from the signal or from the circuit which generates the signal for consistent results with low number of integrated periods.
Finally you can take samples with an AD converter to a computer and calculate the average over a certain time period with software.
BTW. Your drawn signal seems to be sinusoidal voltage, only a part of the period is forced to be zero like the output of a controlled rectifier. If you know the amplitude and the on-off switching angles you can calculate the average as elementary definite integral over the ON-part of the period divided by the length of the full period.