One aspect of the invention relates to an implantable medical device comprising a device housing (100), at least one radio frequency circuit (104) for radio frequency communication, at least one antenna, at least one terminal to electromagnetically couple said at least one antenna to said at least one radio frequency circuit, and a dielectric compartment (101, 1661) that encompasses at least a portion of said at least one antenna. The antenna comprises a conducting pattern, at least a portion of which is shaped as a curve, wherein said curve comprises at least five segments, wherein each of said at least five segments forms an angle with each adjacent segment in said curve, wherein at least three of the at least five segments of said curve are shorter than one-fifth of the longest free-space operating wavelength of the antenna, wherein each angle between adjacent segments is less than 180°, and at least two of the angles between adjacent sections are less than approximately 115°.