Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

problem recreating differentiator effect

yefj

New Member
Hello , I have built a basic PID circuit as shown below.
I put a pulse as input.
The integrator works good it converts the pulse into a ramp . but the differentiator is supoosed to convert the pulse into two spikes.
Why its not happening?
Ltspice file is attached.
Thanks.

1740478499852.png

1740478457688.png
 

Attachments

  • PID_section_united_T.zip
    1.9 KB · Views: 34
The 1nF cap across the differentiator opamp is killing its response.

Without that, a pulse is produced, though at the time scale you are using it is very drawn out.

You are effectively trying to use the opamp at near infinite gain.

It's frequency response is drastically reduced for large signals and high gains - see figures 10 & 11 on page 6 of the datasheet:

The 100 Ohm load resistor is also below the minimum spec for that device.

What are you trying to use the PID for? In any application I've seen, the signal rates of change are typically very slow, or hundreds of Hz up to a few thousand Hz depending on the application - but not in the Megahertz range!
 
The first document design example is targeted at a frequency range of 100Hz to 2.5 KHz, a typical type of range in practice.

The second gives the calculations for the phase compensation cap (the one I removed).

The values in your circuit give a roll-off at around 160KHz, which is why it does not have a fast response.

Also, the input (series) R-C values give a peak response at around 144KHz. Again, way below the frequency you are trying to simulate.
(Those do not allow for the opamp gain and load restrictions).


The commonest applications I've seen for PIDs are matching the response of hardware, such as flow control or servo positioning - which use low frequencies, in the range of the fastest possible mechanical response.

What needs such a fast PID system?
 
Hello rjenkinsgb, I am just trying to figure out how the opamp restrics the differentiation functionality of the opamp.
I put a pulse with rise time of 1nano seconds which is 350Mhz. so maybe this the reason why the differentiator not working.I removed the 1n capacitor.
I am trying to follow the theory so I developed the transfer function of the configuration mathematickly.
You said the following sentence and said I should look at plot 9 and 10 presented below.
How do I see using the plot and ther surrounding components that I dont use properly the OPAMP?
Thanks.
"The values in your circuit give a roll-off at around 160KHz, which is why it does not have a fast response."
1740556786038.png

1740555377362.png

1740555893928.png

1740557375195.png
 
This is open loop GBW of your OpAmp, needless to say its not
going to act as a differentiator to 1 Ghz (3X your input freq to
get any semblance of pulse response)

1740569993469.png
 
If we eliminate the OpAmp, its SR and limited GBW, observe the diff circuit is operating into a virtual
ground, and change the Cap from 22 n to 1 n, we get :

1740585024716.png
 
Using Ideal Op Amps, I added leakage feedback to stabilize integrator to 0V and feedback cap to limit BW on D output. See Plots for P, I, D and PID out. Weighted heavy on Kd

Change any gain or Tau you want. https://tinyurl.com/25fwkzbn
 

Attachments

  • 1740589176609.png
    1740589176609.png
    166 KB · Views: 25
I put a pulse with rise time of 1nano seconds which is 350Mhz. so maybe this the reason why the differentiator not working.I removed the 1n capacitor.
I am trying to follow the theory so I developed the transfer function of the configuration mathematickly.
You said the following sentence and said I should look at plot 9 and 10 presented below.
How do I see using the plot and ther surrounding components that I dont use properly the OPAMP?

The datasheet shows the frequency response rolls off at around 10MHz with just a 6db gain.

If you are wanting to understand the PID functionality, do it using a frequency eg. 100 times or more lower than the opamp datasheet rating.

Frequency ratings are typically for such as low level sine wave signals, at unity gain.
If you want high gain, you need to drastically reduce the signal frequency vs. the opamp limit.

And, you have to allow for that based on the highest required element of the signal frequency!


The "350MHz" you mention for a 1nS rise time edge is just enough to pass the fundamental (1st harmonic).
A square wave has massive harmonic content and that has also to be passed to retain a fast edge.

See figure 2 here:

That's the black line in the plot.
To get the fastest edge shown (red), you need a system bandwidth of over 2GHz.
 
To reduce the extra Op Amps, just make the Ki integrator non inverting with -1 pre-stage,
then Kp and Kd can be replaced with just R and C respectively into your mixer.





1740691592999.png
 
The response with and without AD8034 in the circuit :

1741023794724.png



You have a differentiator response with or without the AD8034, the passive
approach limited, as is 8034 with its limited slew and GBW.

You would have to examine 8034 spice model to see if there is any parasitic
path from input to output, to see if it contributes outside its GBW.
 
Last edited:
Hello Danadack, So with the opamp its just some sort of high pass filter weaker responce.
A pulse of 1n is 350MHz fundamental which is being passed threw, and we want to pass it threw as best as possible.
Two questions:
1.How do I know that the slew rate of the opamp is not enough for good differtiation?
2.How Can I know given the pulse the needed BW of the OPAMP?
 
Hello , I have done an AC responce of the differentiator and as you can see the BW is very high.
differentiator is a high pass filter and we get the passband 25MHz and going up.
There is the RC connection of the circuit and the OPAMP itself.
How can I know given the AC responce that the OPAMP BW is not enough?
Thanks.
LTSPICE files are attached.
1741086047704.png
 

Attachments

  • 04_03_25.zip
    2.5 KB · Views: 23
When you see the OpAmp lose its grip on its virtual ground then
it increasingly is no longer a factor is one way of evaluating it.

1741093073427.png


But remember small signal bode plots do not take into account
slew rate, so both have a play in transfer function performance of
the circuit. Slew rate is a non linear effect, essentially your amplifier
no longer responds in a linear fashion when its spec limits are reached.
 

New Articles From Microcontroller Tips

Back
Top