Hi Waheed, it sounds like you're still not having much luck even with a replacement controller.
Was the other controller that you installed suitable for a Smart Pie?
Although the Magic Pie Edge, Magic Pie 5 and Smart Pie 5 all use the same vector controller, they each require a different firmware to be installed to suit the specific motors.
Have you tried to measure the throttle signal voltage relative to battery
- to see if it varies within the 0.8V to 4.25V range?
I have been studying the attached pictures but I'm not sure if I'm seeing a blown Diode on the controller as the diode on your photo doesn't look like the one shown on the left photo:

It might just be something stuck in the protective coating covering the Diode but the Diode on the right hand photo looks to me as if it may have been damaged.

If you have the brake switch wires connected without the brake cables attached, make sure that none of the brake levers are stuck partially open as shown below:

Are you using a 36V battery for testing? If not, why did you change the voltage setting to 36V?
Alan