When my engine is idling, especially when cold, there is a knocking or banging sound coming from inside. Is this normal?
Believe it or not it is perfectly normal. The actual cause of that noise seems to be in some dispute with 'expert' opinions ranging from the clutch basket (because you'll notice the sound goes away when you pull in the clutch lever) to the balance shafts bouncing around due to slack in the drive chain. Still others blame the clutch overrun mechanism that protects against the rear tire sliding if you downshift and pop the clutch.
I lean toward the clutch basket theory. There are tabs on each of the friction plates that fit into slots in the basket. It isn't a particularly tight fit. When a V-Twin idles the power pulses aren't even so the engine is actually speeding up and slowing down which makes the clutch plates 'slop' back and forth in the slots causing the knocking sound. The good news is, it isn't hurting anything, it's just annoying.
There is a fix. All you have to do is be sure your engine is idling at the factory recommended 950 rpm (+ - 50). At that speed the idle is smooth enough that whatever lash is causing the banging isn't an issue any longer. BTW another good reason to keep the engine at recommended idle speed is oil pressure. Dropping RPM so you have that really cool sounding potato-potato sound means little or no oil getting up to your overhead cams which means excessive wear which means big bucks out of your pocket.