4
\$\begingroup\$

I am trying to simulate the circuit below on SIMSCAPE, and its behavior is different in the simulation and in the real world. The simulation shows an overshoot, while the measurements I made do not - which makes sense since it only has real poles in its transfer function.

If it helps, the zeros are -4.5 and -3.7. The poles are in -39.1, -6.5 and -4.

circuit

Circuit used.

simstep

Simulation for said circuit.

step

Measured step response.

\$\endgroup\$
  • 1
    \$\begingroup\$ 1. Your circuit also has zeros. 2. What is the input impedance of your 'scope? If it's set for 50 ohms, consider how that changes the effect of the 47 kohm resistor in your schematic. \$\endgroup\$ – The Photon Apr 26 '16 at 2:02
  • \$\begingroup\$ Oh, that helps! Indeed I did not pay attention to the scope's input impedance... I'll check it tomorrow at school. If it is that low I guess my whole class will have to re-do stuff... \$\endgroup\$ – Emílio Dolgener Cantú Apr 26 '16 at 2:23
  • \$\begingroup\$ The scope timebase is too quick - try slowing it down to match the simulation - I can see some overshoot so I don't think there is an issue. Non-event! \$\endgroup\$ – Andy aka Apr 26 '16 at 7:15
  • \$\begingroup\$ You are right! It is great to wake up and have the answer! Thank you! \$\endgroup\$ – Emílio Dolgener Cantú Apr 26 '16 at 11:58
6
\$\begingroup\$

There is no problem here at all. The measured step response is in perfect agreement with the simulation. It's just tricks of scaling and windowing that is making it appear that anything is amiss.

Here, I reproduced your circuit in LTspice:

enter image description here

I then matched the timing of the pulse to what is shown on your oscilloscope, and also set the voltage and time scales to the same ones on your oscilloscope. For good measure, I made the graph window aspect ratio and size the same as the oscilloscope's graph appears on my screen. Here is my simulation, with all scaling etc. identical to that of the oscilloscope, side by side with your measurement:

enter image description here

I'd call that a pretty spectacular match. You took your measurement quite well and the circuit is behaving exactly as expected. Since your step response graph from the simulation spans an entire second, and your oscilloscope is really only getting the first ~200ms slice of that response, the overshoot is not apparent. I can tell an 8-bit scope trace on sight, and your scope surely has 8 bits of vertical resolution. The overshoot in the first 200ms slice is about 24mV. At that scale, your scope's ADC has a vertical step size of 6.25mV. So the over shoot would show up as 4 vertical pixels of difference spread over half the horizontal scale (the peak is about at the center, then it starts to drop off).

This would still be ok, except for those 4 pixels being completely eaten by the noise floor on the trace. It's not a line that is 1 pixel sharp. It's a chubby line, it has plenty of room to totally eat up the overshoot in noise. However, this does average out somewhat, which is why you can still see that there is indeed a slight drop off of voltage right towards the end. The density of pixels making up the top most part of the trace starts diminishing, while the density towards the bottom increases. Exactly the behavior we'd expect to see with everything I've mentioned factored together.

Finally, here is that exact simulation that produced the graph perfectly matching the one you measured with your scope, with the same trace but for the full 1 second duration and matched to the scale of your simulation graph, side by side with said graph:

enter image description here

As you can see, all is well. The simulation and measurement and circuit are all behaving exactly as they should, but sometimes it isn't always easy to realize this if the comparison isn't a fair one. When eyeballing waveforms and trace shapes, usually it just works and that's all there is to it. But when something seems to be behaving strangely, but is still similar to what you'd expect, always be mindful of things like scale, aspect ratio, size, resolution, and all those other little gotchyas that can pollute what ultimately gets depicted. Remove those gotchyas one by one, starting with matching your dyanmic range to that of the signal of interest, and if the thing that is wrong is still uncertain or subtle, sometimes you have to simply match everything about the graphs or whatever you're comparing.

This is actually a really great example of this, and I've wanted such an example so I can refer others to it in the future. You've provided an almost ideal and genuine 'case study' of how data visualization can sometimes lie to us. So, uh, thank you for asking this question!

\$\endgroup\$
  • \$\begingroup\$ Yeah - see my comment made 3 hours ago!! \$\endgroup\$ – Andy aka Apr 26 '16 at 10:45
  • \$\begingroup\$ hahaha you are welcome ;) and thanks for the explanation...those little thing that suddenly clear ones mind! \$\endgroup\$ – Emílio Dolgener Cantú Apr 26 '16 at 12:14
1
\$\begingroup\$

Your circuit has a frequency response which - in principle - can be described as (lowpass+bandpass) with a second-order numerator and a third-order denominator. Now - remember the step response of a simple RC bandpass which exhibits a large overshoot befor the signal again approaches zero.

That is the explanation for the observed (small) overshoot, which is caused by the bandpass influence - however, the lowpass influence is dominating. A pure passive RC lowpass of 2nd or higher order shows no overshoot.

\$\endgroup\$
0
\$\begingroup\$

Check your component values, twice.

Your output looks almost exactly like you have 0.27uF capacitors for the first two caps instead of 2.7uF caps. Try those values in your simulation and see! If you are using crummy caps, it's also possible that the tolerance could be affecting the output (caps, particularly ceramic, usually have very wide tolerances).

As The Photon said, check the input impedance of your scope. (Note that it's likely not 50Ω, as the output would be basically zero).

I can verify that your step response is accurate. (More pedantically, the output of your simulator matches my simulator.)

You should also look at the output impedance of your signal generator (or whatever is generating that step). However, from the scope capture, it doesn't look to be more than 2kΩ, which is fine, as it won't affect the output much.

If none of that does the trick, check your wiring, and also probe the intermediate nodes of the circuit to make sure they are behaving as expected (see if they match the simulated output).

\$\endgroup\$
0
\$\begingroup\$

Your circuit actually has two zeros. This can be seen from the two capacitors in series with the signal. The third capacitor at right (you really should add component designators) is the only one forming a pole.

So in summary, your system has one pole and two zeros, so there should be nothing surprising on those grounds about it exhibiting overshoot.

\$\endgroup\$
  • \$\begingroup\$ A slight correction: The circuit has three real poles (given in rad/s): -4.1, -6.5, -39.1 \$\endgroup\$ – LvW Apr 26 '16 at 11:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.