This shows you the differences between the selected revision and the current version of the page.
| gnucap:manual:commands:measure 2009/12/04 03:45 | gnucap:manual:commands:measure 2009/12/04 03:49 current | ||
|---|---|---|---|
| Line 41: | Line 41: | ||
| Before making measurements, you need to store the data to measure: | Before making measurements, you need to store the data to measure: | ||
| - | store tran v(*) id(m*) gm(m*) | + | gnucap> store tran v(*) id(m*) gm(m*) |
| Then do the analysis | Then do the analysis | ||
| - | transient 0 100u 1u trace all | + | gnucap> transient 0 100u 1u trace all |
| Now you are ready to measure: | Now you are ready to measure: | ||
| - | measure t2 = cross(probe="v(out)" cross=0 rise last) | + | gnucap> measure t2 = cross(probe="v(out)" cross=0 rise last) |
| Find the last time that v(out) crosses 0, going up. | Find the last time that v(out) crosses 0, going up. | ||
| - | measure t1 = cross(probe="v(out)" cross=0 rise last before=t2) | + | gnucap> measure t1 = cross(probe="v(out)" cross=0 rise last before=t2) |
| Find the last rising zero crossing before t2. | Find the last rising zero crossing before t2. | ||
| - | param period = {t2-t1} | + | gnucap> param period = {t2-t1} |
| - | param frequency = {1/period} | + | gnucap> param frequency = {1/period} |
| Params are interpreted like a functional language so they will be updated whenever t1 or t2 changes. | Params are interpreted like a functional language so they will be updated whenever t1 or t2 changes. | ||
| - | measure meanvalue = mean(probe="v(out)" begin=t1 end=t2) | + | gnucap> measure meanvalue = mean(probe="v(out)" begin=t1 end=t2) |
| Find the mean value of v(out) over one cycle. | Find the mean value of v(out) over one cycle. | ||
| - | measure sample = mean(probe="v(out)") | + | gnucap> measure sample = mean(probe="v(out)") |
| Find the mean value of v(out) for an entire run. | Find the mean value of v(out) for an entire run. | ||
| - | measure area = integrate(probe="v(out)" begin=t1 end=t2) | + | gnucap> measure area = integrate(probe="v(out)" begin=t1 end=t2) |
| Find the area under the curve of v(out) over one cycle. The area might be zero. | Find the area under the curve of v(out) over one cycle. The area might be zero. | ||
| - | measure rms = rms(probe="v(out)" begin=t1 end=t2) | + | gnucap> measure rms = rms(probe="v(out)" begin=t1 end=t2) |
| Find the RMS value of v(out) over one cycle. | Find the RMS value of v(out) over one cycle. | ||
| + | |||
| + | gnucap> measure rmsin = rms(probe="bar(in)") | ||
| + | no match: bar(in) | ||
| + | You didn't store the probe "bar(in)". | ||
| + | |||