@PRIYADHARSHINI I just now noticed that the you have reversed the inverting and non-inverting inputs to op-amp U1B, creating positive feedback from the output to the non-inverting input. The junction of your feedback resistor, R3, and the input resistor, R4,
must connect to the U1B inverting input, pin 6, else the op-amp will behave as a bi-stable latch switching between the positive rail and ground. Also, the original circuit posted by
@BobK applies the input signal, V1, to the
non-inverting input of the op-amp through a voltage divider.
The circuit recently posted by
@PRIYADHARSHINI won't work, even with correction of the wiring to the inputs of U1B, because the positive input into R4 from the output on pin 1 of non-inverting buffer-connected U1A is a positive voltage that will try to drive the output of U1B negative. It will fail to do that without a negative power supply connected to pin 4 instead of the connection to ground.
@BobK 's original circuit in post #4 is correct. You should use it. He has even made the impedance "seen" by the inverting and non-inverting inputs the same, which is always a good idea. And he mentions that without a negative power supply rail on the op-amp, the output cannot ever be zero. Also, Bob applies the positive-going input pwm signal to the
non-inverting input, assuring that the output goes positive. He applies the "offset" correction to the ground side of the feedback network through the 10 kΩ resistor, R1 in his simulation. This offset voltage is represented by V3 in Bob's circuit, but he doesn't provide a voltage value. The value depends on the minimum pulse width of your pwm signal. You should reproduce Bob's circuit
exactly as shown if you don't want to provide a negative power supply rail. Otherwise, provide a negative rail and correct the input connections to U1B to use the circuit you posted. The output however will be negative, between 0 and -10 V DC, instead of between 0 and +10 VDC because of the signal inversion in U1B. Is that what you want?
All I was suggesting, before noticing the errors in
@PRIYADHARSHINI latest circuit, is that you derive the offset voltage with a potentiometer voltage divider connected between the +15 V DC supply and ground so as to allow a small adjustment range for the offset. The series combination of a 10 kΩ resistor with a 1 kΩ potentiometer will produce about 1.4 V DC across the pot when connected to the +15 V DC supply. That means about 0.7 V DC offset is available when the pot wiper is centered between its two limits. Again, if this "correction" is applied to the non-inverting input through R1 in Bob's original circuit it will drive the output more negative as the filtered pwm input drives the output more positive. But it still won't be capable of adjustment to zero output without a negative supply applied to the op-amp.