Loud knocking noises coming out from AC is not a normal phenomenon. Air conditioners are supposed to be functioning at bare minimum noise. Such loud noises are usually signs of some defect in the machine.
The common causes are -
There might be a loose part in the AC compressor, which is causing the knocking sound. If the case is severe, the compressor should be replaced.
The fan unit inside is unbalanced.
The compressor itself is loose or there are displaced loose parts inside the blower unit.