The principle of switching power supply is to cut​the DC voltage​obtained after the mains is…