??? 01/29/11 13:46 Read: times |
#180910 - RE: How to measure a clipped and non-clipped sinewave Responding to: ???'s previous message |
Per Westermark said:
Note about #1
As soon as the output starts to clip, that relation fails. Oh, right. That is the reason for error so what is happening is nothing but expected. Per Westermark said:
It would have been way better if you had been able to sample the ADC output of the transformer at high enough speed to let you compute the RMS energy instead of measuring the top voltage. I agree. Even an average of all samples also will suffice I think instead of RMS. Am I right? As RMS will again take its own overhead and given the MCU (without hardware multiply/divide), it will be a bit more complicated. Per Westermark said:
Also, the capacitor means that the design is a low-pass filter, slowing down your regulation loop because the capacitor isn't instantly emptied if the primary voltage to the transformer quickly drops. Yes and without a capacitor, there is a lot of ripple. So in all, it indicates that this (rectifier + filter) is not a good way to measure it in this situation. Per Westermark said:
#2
Peak voltage (as you have already noted) measurement does not work if you have distortion. But even more importantly is that your program should be written so that it never fails to measure. If you can't guarantee real-time performance, then you can't guarantee that you will not create big disasters on the high-power side. Your regulation loop just has to be fast enough. It's not an option but a requirement. I am trying to find out ways to do that, I mean to accommodate real time or near real time measurements with the existing MCU. Per Westermark said:
#3
I'm not sure what you mean with ZC, and feel you have to give a better description of exactly what you are trying to do. By ZC I mean zero crossing. Since the sinewave is centered around 2.5V, it is possible to detect a zero crossing. Per Westermark said:
In some situations, it may be way easier to measure a delta, i.e. the residual error. This can be done by scaling the output voltage and then subtract a pure sine wave of correct amplitude. If the output voltage is too high or low, you will get a positive or negative voltage to measure. If the output voltage starts to clip, you will also get an error difference that the processor can respond to. I am also thinking on this line. I already have a sine table stored in program memory, which is actually used to generate the sinewave. So if I measure the ADC input and then compare the values with these stored values, I can get the error. Again here sampling at right time is very important. Otherwise the error will be more erroneous. Per Westermark said:
From the low number of samples you seem to take in the feedback loop, I guess you are not trying to waveform-adjust the output - you are just trying to figure out if the output voltage is too high or low? Well, by 'Waveform-adjust' you mean the same thing as stated above? I mean correcting the sine values based on error observed? Logic I am using at present is that, if the measured voltage is less than a threshold, increase the sine values (increase the multiplier actually used to scale the stored sine table). Conversely if the measured voltage is higher than a threshold, decrease the multiplier. There is a hysteresis kept between these two thresholds to avoid unnecessary fluctuations. Many thanks for reply Per Westermark. I think gist of this is the 'requirement' to do real time sampling. |
Topic | Author | Date |
How to measure a clipped and non-clipped sinewave accurately | 01/01/70 00:00 | |
peak voltages does not represent RMS if distorted curve | 01/01/70 00:00 | |
RE: How to measure a clipped and non-clipped sinewave | 01/01/70 00:00 | |
Still can't look at a single point in time | 01/01/70 00:00 | |
RE: Still can't look at a single point in time | 01/01/70 00:00 | |
peak-to-RMS relation In general | 01/01/70 00:00 | |
I have posted this thread on some other forum | 01/01/70 00:00 | |
Sine feedback for inverter | 01/01/70 00:00 | |
Absolutely | 01/01/70 00:00 | |
Re: Sine feedback for inverter | 01/01/70 00:00 | |
hints | 01/01/70 00:00 | |
Waveform comparison | 01/01/70 00:00 | |
What if? | 01/01/70 00:00 | |
Drive and table | 01/01/70 00:00 | |
Re: Waveform comparison | 01/01/70 00:00 |