Electronic – A question on eliminating ringing on a pulse

ringing

enter image description here

Above is a circuit with L C R components to model ringing.

As you see a 1V 50Hz pulse is applied to the circuit.
The ringing can be seen at the output pulse in blue color which has the resonance frequency of the parallel LC.

Even though the input signal is 50Hz, since it is a pulse(composed of harmonic sines) it generates ringing at the 5kHz component of the pulse(resonance freq. component).

My question is: Is there a remedy for this ringing at the output without affecting the pulse widths?

Edit:

I added a series LC with the same resonance freq. in series with R as seen below:

enter image description here

If I take the output from terminal of R1 the output (Out1 on circuit) is with a large spike(please left-click to enlarge):
enter image description here

But if I take the output from the terminal of C2 the output (Out2 on circuit) is clean and with no ringing; with large rising and falling edges but this could be fixed with a comparator I guess.
Here is Out2 on circuit:

enter image description here

edit2:

Here is the output from Andy aka's suggestion which completely removed ringing by keeping the pulses sharp:

enter image description here

Best Answer

The ringing is because the inductor and capacitor are acting as an underdamped resonant circuit. You can add more damping by placing a resistor in parallel with them both or a resistor in series with the inductor or capacitor. If you increase the value of series resistor (or decrease the parallel resistor) the ringing should start to subside but, you will never get a perfect rectangluar wave coming out when ringing is minimized.